Last active
September 17, 2018 17:17
-
-
Save juucustodio/7b98a325f2e6d7bbab0e71f1f0b35036 to your computer and use it in GitHub Desktop.
Demo de utilização da Câmera - Xamarin.Forms http://julianocustodio.com/camera-xamarin-forms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Plugin.Media; | |
using Android.App; | |
using Android.Content.PM; | |
using Android.OS; | |
namespace DemoCamera.Droid | |
{ | |
[Activity(Label = "DemoCamera", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] | |
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity | |
{ | |
protected override async void OnCreate(Bundle bundle) | |
{ | |
TabLayoutResource = Resource.Layout.Tabbar; | |
ToolbarResource = Resource.Layout.Toolbar; | |
base.OnCreate(bundle); | |
await CrossMedia.Current.Initialize(); | |
global::Xamarin.Forms.Forms.Init(this, bundle); | |
LoadApplication(new App()); | |
} | |
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Android.Content.PM.Permission[] grantResults) | |
{ | |
Plugin.Permissions.PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment