protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); Xamarin.Essentials.Platform.Init(this, bundle); Window.AddFlags(WindowManagerFlags.Fullscreen); Window.ClearFlags(WindowManagerFlags.ForceNotFullscreen); LifecycleEventListener = new LifecycleEventListener(this, WindowManager); LifecycleEventListener.Enable(); Instance = this; Forms.Init(this, bundle); if (Build.VERSION.SdkInt >= BuildVersionCodes.M) { if (ContextCompat.CheckSelfPermission(Forms.Context, Manifest.Permission.Camera) != (int)Permission.Granted) { ActivityCompat.RequestPermissions(Instance, new[] { Manifest.Permission.Camera }, CAMERA_PERMISSION_REQUEST_CODE); } else { _app = new App(); LoadApplication(_app); } } else { _app = new App(); LoadApplication(_app); } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); Xamarin.Essentials.Platform.Init(this, bundle); Window.AddFlags(WindowManagerFlags.Fullscreen); Window.ClearFlags(WindowManagerFlags.ForceNotFullscreen); LifecycleEventListener = new LifecycleEventListener(this, WindowManager); LifecycleEventListener.Enable(); Instance = this; Forms.Init(this, bundle); if (Build.VERSION.SdkInt >= BuildVersionCodes.M) { if (CheckForAndRequestRequiredPermissions()) { return; } } _app = new App(); LoadApplication(_app); }