Пример #1
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     TabLayoutResource = Resource.Layout.Tabbar;
     ToolbarResource = Resource.Layout.Toolbar;
     base.OnCreate(savedInstanceState);
     PermissionHandler.Activity = this;
     Xamarin.Essentials.Platform.Init(this, savedInstanceState);
     global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
     MainPage.Activity = this;
     LoadApplication(new App());
     ph = new PermissionHandler(Manifest.Permission.Internet, Manifest.Permission.WriteExternalStorage, Manifest.Permission.ReadExternalStorage);
     ph.RequestAllPermissions();
 }
Пример #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App());
            MainPage.AppContext = this;
            PermissionHandler handler = new PermissionHandler(this, new string[] { Manifest.Permission.AccessWifiState, Manifest.Permission.ChangeWifiState });

            if (!handler.HasAllPermissions())
            {
                handler.RequestAllPermissions();
            }
        }
Пример #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);
            ph = new PermissionHandler(this, new string[]
            {
                Manifest.Permission.Internet
            });
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App());
            ClientPage.AppContext = this;
            ph.RequestAllPermissions();
        }