Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Demo de utilização da Câmera - Xamarin.Forms
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;
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