Esempio n. 1
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            PlatformOpenTokService.Init();
            global::Xamarin.Forms.Forms.Init();
            AiForms.Dialogs.Dialogs.Init();
            Xamarin.FormsMaps.Init();
            Xamarin.FormsGoogleMaps.Init(AppConfigurations.IosGoogleMapsAPIKey);
            App.Context = this;

            Firebase.Core.App.Configure();
            Rg.Plugins.Popup.Popup.Init();
            Plugin.InputKit.Platforms.iOS.Config.Init();

            CGRect bounds = UIScreen.MainScreen.Bounds;

            if (UIApplication.SharedApplication.StatusBarOrientation == UIInterfaceOrientation.LandscapeLeft || UIApplication.SharedApplication.StatusBarOrientation == UIInterfaceOrientation.LandscapeRight)
            {
                bounds.Size = new CGSize(bounds.Size.Height, bounds.Size.Width);
            }
            activityIndicator = new UIActivityIndicator(bounds);

            string id    = null;
            string alert = null;
            string code  = null;
            string url   = string.Empty;

            if (options != null && options.Keys != null && options.Keys.Count() != 0 && options.ContainsKey(new NSString("UIApplicationLaunchOptionsRemoteNotificationKey")))
            {
                var remoteNotificationKey = options.ObjectForKey(new NSString("UIApplicationLaunchOptionsRemoteNotificationKey")) as NSDictionary;

                if (null != remoteNotificationKey && remoteNotificationKey.ContainsKey(new NSString("aps")))
                {
                    NSDictionary aps = remoteNotificationKey.ObjectForKey(new NSString("aps")) as NSDictionary;

                    if (aps.ContainsKey(new NSString("id")))
                    {
                        id = (aps[new NSString("id")] as NSString).ToString();
                    }

                    if (aps.ContainsKey(new NSString("alert")))
                    {
                        alert = (aps[new NSString("alert")] as NSString).ToString();
                    }

                    if (aps.ContainsKey(new NSString("code")))
                    {
                        code = (aps[new NSString("code")] as NSString).ToString();
                    }

                    if (aps.ContainsKey(new NSString("Url")))
                    {
                        url = (aps[new NSString("Url")] as NSString).ToString();
                    }
                }
            }

            LoadApplication(new App(id, alert, code, url));

            return(base.FinishedLaunching(app, options));
        }
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            PlatformOpenTokService.Init();
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Esempio n. 3
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;
            PlatformOpenTokService.Init();
            base.OnCreate(bundle);
            Xamarin.Essentials.Platform.Init(this, bundle);
            progressDialog = new ProgressDialog(this);
            progressDialog.Indeterminate = true;
            progressDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
            progressDialog.SetCancelable(false);
            global::Xamarin.Forms.Forms.Init(this, bundle);
            FormsMaps.Init(this, bundle);
            FormsGoogleMaps.Init(this, bundle);
            FirebaseApp.InitializeApp(this);
            Acr.UserDialogs.UserDialogs.Init(this);
            AiForms.Dialogs.Dialogs.Init(this);
            Plugin.InputKit.Platforms.Droid.Config.Init(this, bundle);
            Rg.Plugins.Popup.Popup.Init(this, bundle);
            App.Context = this;

            if (Intent.Extras != null)
            {
                foreach (var key in Intent.Extras.KeySet())
                {
                    if (key != null)
                    {
                        var value = Intent.Extras.GetString(key);
                    }
                }
            }

            string url = "";

            if (MessagingService.WebContentList != null)
            {
                if (MessagingService.WebContentList.ContainsKey("Url"))
                {
                    url = MessagingService.WebContentList["Url"];
                }
                MessagingService.WebContentList = null;
            }


            var id      = Intent.GetStringExtra("id");
            var message = Intent.GetStringExtra("message");
            var code    = Intent.GetStringExtra("code");

            StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
            StrictMode.SetVmPolicy(builder.Build());
            builder.DetectFileUriExposure();

            LoadApplication(new App(id, message, code, url));
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;
            PlatformOpenTokService.Init();
            base.OnCreate(savedInstanceState);

            CrossCurrentActivity.Current.Activity = this;
            Forms.Init(this, savedInstanceState);

            LoadApplication(new App());
        }
Esempio n. 5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            Forms.SetFlags("CollectionView_Experimental");

            base.OnCreate(savedInstanceState);

            UserDialogs.Init(this);

            PlatformOpenTokService.Init();
        }
Esempio n. 6
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     global::Xamarin.Forms.Forms.SetFlags("Shapes_Experimental");
     TabLayoutResource = Resource.Layout.Tabbar;
     ToolbarResource   = Resource.Layout.Toolbar;
     PlatformOpenTokService.Init();
     base.OnCreate(savedInstanceState);
     Xamarin.Essentials.Platform.Init(this, savedInstanceState);
     global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
     base.SetTheme(global::Android.Resource.Style.ThemeHoloLight);
     CrossCurrentActivity.Current.Activity = this;
     Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
     LoadApplication(new App());
     Window.SetStatusBarColor(Android.Graphics.Color.Rgb(151, 97, 253));
 }
Esempio n. 7
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            PlatformOpenTokService.Init();

            base.OnCreate(savedInstanceState);

            CrossCurrentActivity.Current.Activity = this;

            global::Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental");
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App());
        }