Ejemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);
            global::Xamarin.Forms.Forms.Init(this, bundle);
            DependencyService.Register <ToastNotification>();
            ToastNotification.Init(this, new PlatformOptions()
            {
                SmallIconDrawable = Android.Resource.Drawable.IcDialogInfo
            });
            XamForms.Controls.Droid.Calendar.Init();
            CarouselViewRenderer.Init();
            new SfChartRenderer();
            SegmentedControlRenderer.Init();
            SendAnyPreviousCrash(); //read log file and send crash report if available
            app = new App();
            MessagingCenter.Subscribe <App, string>(app, AppConstant.ErrorEvent, (s, error) =>
            {
                app.MainPage.DisplayAlert("Error", AppConstant.ErrorText, "Close");
                SendErrorEmail(error);
            });

            LoadApplication(app);
        }
Ejemplo n.º 2
0
 //
 // This method is invoked when the application has loaded and is ready to run. In this
 // method you should instantiate the window, load the UI into it and then make the window
 // visible.
 //
 // You have 17 seconds to return from this method, or iOS will terminate your application.
 //
 public override bool FinishedLaunching(UIApplication app, NSDictionary options)
 {
     global::Xamarin.Forms.Forms.Init();
     LoadApplication(new App());
     SegmentedControlRenderer.Init();
     return(base.FinishedLaunching(app, options));
 }
Ejemplo n.º 3
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            var cv       = typeof(Xamarin.Forms.CarouselView);
            var assembly = Assembly.Load(cv.FullName);

            SegmentedControlRenderer.Init();
            LoadApplication(new Forms.App(new iOSInitializer()));


            //var cv = typeof(Xamarin.Forms.CarouselView);
            //var assembly = Assembly.Load(cv.FullName);

            app.StatusBarStyle = UIStatusBarStyle.LightContent;
            //UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(61, 205, 88);
            //UINavigationBar.Appearance.TintColor = UIColor.White;
            //UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes
            //{
            //  TextColor = UIColor.White
            //});
            var manager = BITHockeyManager.SharedHockeyManager;

            manager.Configure("7ac05bace8c64acc9016fe633835f58c");
            manager.DisableMetricsManager = true;
            manager.StartManager();
            manager.Authenticator.AuthenticateInstallation(); // This line is obsolete in crash only builds



            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 4
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;

            ToolbarResource = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            CarouselView.FormsPlugin.Android.CarouselViewRenderer.Init();

            Xamarin.FormsGoogleMaps.Init(this, bundle);

            //BlobCache.ApplicationName = "Voltaire";

            Acr.UserDialogs.UserDialogs.Init(this);

            var displayMetrics = this.Resources.DisplayMetrics;

            App.ScreenWidth = ConvertPixelsToDp(displayMetrics.WidthPixels);

            App.ScreenHeight = ConvertPixelsToDp(displayMetrics.HeightPixels);

            global::Xamarin.Forms.Forms.Init(this, bundle);

            SegmentedControlRenderer.Init();

            TintedImageRenderer.Init();
#if DEBUG
#else
            AppCenter.Start("c1308239-5175-41b4-a352-61530846726e", typeof(Distribute), typeof(Analytics), typeof(Crashes));
#endif

            LoadApplication(new App());
        }
Ejemplo n.º 5
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            _window = new UIWindow(UIScreen.MainScreen.Bounds);

            var setup = new Setup(this, _window);

            setup.Initialize();

            // Init application
            var startup = Mvx.Resolve <IMvxAppStart>();

            startup.Start();

            // HockeyApp
            var manager = BITHockeyManager.SharedHockeyManager;

            manager.Configure("7bbf2e7de05b4379a72711e0ba3c1e4a");
            manager.StartManager();
            manager.Authenticator.AuthenticateInstallation(); // This line is obsolete in crash only builds

            // Init SyncFusion controls
            new SfChartRenderer();
            new SfBusyIndicatorRenderer();
            SfListViewRenderer.Init();
            SegmentedControlRenderer.Init();
            SlideOverKit.iOS.SlideOverKit.Init();

            // Make UIWindow they key window
            _window.MakeKeyAndVisible();

            // Setup color scheme
            UIColor accentColor          = UIColor.FromRGB(1, 100, 157);
            UIColor secondaryAccentColor = UIColor.FromRGB(237, 239, 240);

            // UISlider
            UISlider.Appearance.TintColor      = accentColor;
            UISlider.Appearance.ThumbTintColor = accentColor;
            // UISwitch
            UISwitch.Appearance.TintColor   = accentColor;
            UISwitch.Appearance.OnTintColor = accentColor;
            // UITabBar
            UITabBar.Appearance.BarTintColor           = secondaryAccentColor;
            UITabBar.Appearance.BackgroundColor        = secondaryAccentColor;
            UITabBar.Appearance.TintColor              = UIColor.FromRGB(1, 100, 157);;
            UITabBar.Appearance.SelectedImageTintColor = UIColor.FromRGB(1, 100, 157);
            // UINavigationBar
            UINavigationBar.Appearance.BarTintColor = accentColor;
            UINavigationBar.Appearance.TintColor    = UIColor.White;
            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes {
                TextColor = UIColor.White
            });
            // UIToolbar
            UIToolbar.Appearance.BackgroundColor = accentColor;
            UIToolbar.Appearance.TintColor       = UIColor.White;

            return(true);
        }
Ejemplo n.º 6
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            SegmentedControlRenderer.Init();
            Xamarin.FormsGoogleMaps.Init(Config.google_maps_ios_api_key);
            RoundedBoxViewRenderer.Init();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 7
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     TabLayoutResource = Resource.Layout.Tabbar;
     ToolbarResource   = Resource.Layout.Toolbar;
     base.OnCreate(savedInstanceState);
     Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("NTU0MTBAMzEzNjJlMzMyZTMwREd2d2FYcmdNMjNhOHJ4em1jczAwM3RnbDRLV016SmVVS2M4YTFYY1R0VT0=");
     global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
     SegmentedControlRenderer.Init();
     LoadApplication(new App());
 }
Ejemplo n.º 8
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);
            SegmentedControlRenderer.Init();
            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());
        }
Ejemplo n.º 9
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("NTI2NDZAMzEzNjJlMzMyZTMwb1pKcEVYNGZhVWw2d2JDVTNNNHVtMzMyMnJRRUZyM2l6OE9PbThrY2E5cz0=");
            SegmentedControlRenderer.Initialize();
            Syncfusion.XForms.iOS.Buttons.SfSegmentedControlRenderer.Init();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 10
0
        public override void DidFinishLaunching(NSNotification notification)
        {
            // Insert code here to initialize your application

            global::Xamarin.Forms.Forms.Init();

            SegmentedControlRenderer.Initialize();

            LoadApplication(new App());
            base.DidFinishLaunching(notification);
        }
Ejemplo n.º 11
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            XamForms.Controls.iOS.Calendar.Init();
            Rg.Plugins.Popup.Popup.Init();
            CarouselViewRenderer.Init();
            SegmentedControlRenderer.Init();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 12
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);
            Xamarin.Forms.Forms.Init(this, savedInstanceState);
            SegmentedControlRenderer.Init();
            UserDialogs.Init(this);
            LoadApplication(new App(new AndroidPlatformInitializer()));
        }
Ejemplo n.º 13
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;
            LocalNotificationsImplementation.NotificationIconId = Resource.Drawable.clock_white;

            base.OnCreate(bundle);
            Com.ViewPagerIndicator.CirclePageIndicator circlePageIndicator = new Com.ViewPagerIndicator.CirclePageIndicator(Android.App.Application.Context);
            Forms.Init(this, bundle);
            SegmentedControlRenderer.Init();
            LoadApplication(new App());
        }
Ejemplo n.º 14
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            Rg.Plugins.Popup.Popup.Init();
            Xamarin.Forms.Forms.Init();
            SharpnadoInitializer.Initialize();
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
            LoadApplication(new App());
            Plugin.InputKit.Platforms.iOS.Config.Init();
            SegmentedControlRenderer.Init();

            return(base.FinishedLaunching(application, launchOptions));
        }
Ejemplo n.º 15
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            Xamarin.Forms.Forms.Init(this, savedInstanceState);
            SegmentedControlRenderer.Init();
            TetraPakMainActivity.OnCreate(this, savedInstanceState);
            LoadApplication(new App());
        }
Ejemplo n.º 16
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            CrossCurrentActivity.Current.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            SegmentedControlRenderer.Init();
            LoadApplication(new App(new AndroidInitializer()));
        }
Ejemplo n.º 17
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);
            SegmentedControlRenderer.Init();
            XamForms.Controls.Droid.Calendar.Init();
            global::Xamarin.Forms.Forms.Init(this, bundle);
            Rg.Plugins.Popup.Popup.Init(this, bundle);
            CarouselViewRenderer.Init();
            LoadApplication(new App());
        }
Ejemplo n.º 18
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            SegmentedControlRenderer.Init();
            Xamarin.FormsGoogleMaps.Init(this, bundle);
            Plugin.CurrentActivity.CrossCurrentActivity.Current.Activity = this;
            RoundedBoxViewRenderer.Init();
            LoadApplication(new App());
        }
Ejemplo n.º 19
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            DependencyService.Register <ToastNotification>();
            ToastNotification.Init();
            XamForms.Controls.iOS.Calendar.Init();
            CarouselViewRenderer.Init();
            SegmentedControlRenderer.Init();
            new SfChartRenderer();

            SendAnyPreviousCrash(); //read log file and send crash report if available
            mainApplication = new App();
            MessagingCenter.Subscribe <App, string>(mainApplication, AppConstant.ErrorEvent, (s, error) =>
            {
                mainApplication.MainPage.DisplayAlert("Error", AppConstant.ErrorText, "Close");
                SendErrorEmail(error);
            });

            LoadApplication(mainApplication);

            #region Pie Chart Title Customization
            Xamarin.Forms.Forms.ViewInitialized += (object sender, Xamarin.Forms.ViewInitializedEventArgs e) =>
            {
                if (e.NativeView is SFChart)
                {
                    (e.NativeView as SFChart).Delegate = new ChartCustomDelegate(e.View as SfChart);
                }
            };
            #endregion
            if (UIDevice.CurrentDevice.CheckSystemVersion(10, 0))
            {
                // Request Permissions
                UNUserNotificationCenter.Current.RequestAuthorization(UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound, (granted, error) =>
                {
                    // Do something if needed
                });
            }
            else if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
            {
                var notificationSettings = UIUserNotificationSettings.GetSettingsForTypes(
                    UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, null
                    );

                app.RegisterUserNotificationSettings(notificationSettings);
            }

            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 20
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);

            // Add
            Xamarin.FormsGoogleMaps.Init(this, savedInstanceState);
            SegmentedControlRenderer.Init();

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

            base.OnCreate(savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            global::Plugin.Media.CrossMedia.Current.Initialize();
            CardsViewRenderer.Preserve();

            CrossCurrentActivity.Current.Init(this, savedInstanceState);
            CrossCurrentActivity.Current.Activity = this;
            SegmentedControlRenderer.Init();
            UserDialogs.Init(this);
            LoadApplication(new App());
        }
Ejemplo n.º 22
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);
            Plugin.InputKit.Platforms.Droid.Config.Init(this, savedInstanceState); // < ---- Add here

            Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer: true);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);

            SharpnadoInitializer.Initialize();
            SegmentedControlRenderer.Init();
            LoadApplication(new App());
        }
Ejemplo n.º 23
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();

            CarouselViewRenderer.Init();
            SegmentedControlRenderer.Init();
            ImageCircleRenderer.Init();

            LoadApplication(new App());

            //UIViewControllerBasedStatusBarAppearance set false 设置系统栏内容颜色
            UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false);

            //修改TabBar选中颜色
            //http://motzcod.es/post/138225183932/tintcolor-selectedimage-xamarin-forms-ios
            UITabBar.Appearance.SelectedImageTintColor = UIColor.Red;

            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 24
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            RoundedBoxViewRenderer.Init();
            CarouselViewRenderer.Init();
            SegmentedControlRenderer.Init();
            XamForms.Controls.Droid.Calendar.Init();

            UserDialogs.Init(() => (Activity)Forms.Context);

            var mainForms = new App();

            LoadApplication(mainForms);


            if (Intent.Action == Intent.ActionSend)
            {
                // This is just an example of the data stored in the extras
                var    uriFromExtras = Intent.GetParcelableExtra(Intent.ExtraStream) as Android.Net.Uri;
                string path          = Intent.GetParcelableExtra(Intent.ExtraStream).ToString();
                var    subject       = Intent.GetStringExtra(Intent.ExtraTitle);

                // Get the info from ClipData
                var pdf = Intent.ClipData.GetItemAt(0);

                // Open a stream from the URI
                var pdfStream = ContentResolver.OpenInputStream(pdf.Uri);

                // Save it over
                var memOfPdf = new System.IO.MemoryStream();
                pdfStream.CopyTo(memOfPdf);
                var docsPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
                var filePath = System.IO.Path.Combine(docsPath, "temp");
                System.IO.File.WriteAllBytes(filePath, memOfPdf.ToArray());
                mainForms.ShareFile(memOfPdf.ToArray(), System.IO.Path.GetFileName(path));
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);

            SegmentedControlRenderer.Init();
            Xamarin.FormsMaps.Init(this, savedInstanceState);
            DependencyService.Register <ToastNotification>();
            ToastNotification.Init(this);

            //InputKit plugin
            Plugin.InputKit.Platforms.Droid.Config.Init(this, savedInstanceState);

            LoadApplication(new App());
        }
Ejemplo n.º 26
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var renderer = new Syncfusion.SfAutoComplete.XForms.iOS.SfAutoCompleteRenderer();

            global::Xamarin.Forms.Forms.Init();

            SegmentedControlRenderer.Init();
            CarouselViewRenderer.Init();

            KeyboardOverlapRenderer.Init();

            AnimationViewRenderer.Init();

            Xamarin.FormsGoogleMaps.Init("AIzaSyCxXBNtq5ksFXZJBwW_SRkf3gEMOg4YhPc");

            TintedImageRenderer.Init();

            App.ScreenHeight = UIScreen.MainScreen.Bounds.Height;
            App.ScreenWidth  = UIScreen.MainScreen.Bounds.Width;

            //BlobCache.ApplicationName = "Voltaire";

            // Code for starting up the Xamarin Test Cloud Agent
#if DEBUG
            Xamarin.Calabash.Start();
#else
            AppCenter.Start("3d0ef256-3c90-4860-b789-63ff7e930523",
                            typeof(Distribute), typeof(Analytics), typeof(Crashes));
            Distribute.DontCheckForUpdatesInDebug();
#endif
            SfListViewRenderer.Init();
            LoadApplication(new App());

            SfPdfDocumentViewRenderer.Init();

            var result = base.FinishedLaunching(app, options);

            UIApplication.SharedApplication.StatusBarHidden = false;

            return(result);
        }
Ejemplo n.º 27
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            SegmentedControlRenderer.Init();
            Messier16.Forms.iOS.Controls.Messier16Controls.InitAll();
            LoadApplication(new App());

            UITabBar.Appearance.SelectedImageTintColor = UIColor.FromRGB(20, 153, 0);
            UITabBarItem.Appearance.SetTitleTextAttributes(
                new UITextAttributes()
            {
                TextColor = UIColor.FromRGB(20, 153, 0)
            }, UIControlState.Selected);
            UITabBarItem.Appearance.SetTitleTextAttributes(
                new UITextAttributes()
            {
                TextColor = UIColor.FromRGB(0, 0, 0)
            },
                UIControlState.Normal);
            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 28
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // this needs to be loaded before EVERYTHING
#pragma warning disable CS1702 // Assuming assembly reference matches identity
            iOSShinyHost.Init(new Startup());
#pragma warning restore CS1702 // Assuming assembly reference matches identity

            Forms.Init();
            FormsMaterial.Init();
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
            Xamarin.FormsMaps.Init();
            Rg.Plugins.Popup.Popup.Init();
            TintedImageRenderer.Init();
            Forms9Patch.iOS.Settings.Initialize(this);
            SegmentedControlRenderer.Init();

            Distribute.DontCheckForUpdatesInDebug();

            LoadApplication(new App());
            return(base.FinishedLaunching(app, options));
        }
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();

            SegmentedControlRenderer.Init();
            Xamarin.FormsMaps.Init();
            ZXing.Net.Mobile.Forms.iOS.Platform.Init();

            DependencyService.Register <ToastNotification>();
            ToastNotification.Init();
            FlowListView.Init();
            Plugin.InputKit.Platforms.iOS.Config.Init();


            LoadApplication(new App());

            SecureStorageImplementation.DefaultAccessible = Security.SecAccessible.Invalid;

            // Request Permissions
            if (UIDevice.CurrentDevice.CheckSystemVersion(10, 0))
            {
                // Request Permissions
                UNUserNotificationCenter.Current.RequestAuthorization(UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound, (granted, error) =>
                {
                    // Do something if needed
                });
            }
            else if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
            {
                var notificationSettings = UIUserNotificationSettings.GetSettingsForTypes(
                    UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, null);

                app.RegisterUserNotificationSettings(notificationSettings);
            }

            //launch input kit plugin
            Plugin.InputKit.Platforms.iOS.Config.Init();

            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 30
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            Com.Mapbox.Mapboxsdk.Mapbox.GetInstance(this, MapboxSetting.AccessToken);

            Forms.Init(this, bundle);
            CachedImageRenderer.Init(null);
            SegmentedControlRenderer.Init();

            //INITIALIZE BEFORE LOAD APPLICATION
            InitializeStripeClient();

            LoadApplication(new App());

            //INITIALIZE AFTER LOAD APPLICATION
            InitilizeFireBase();
            InitializeMessagingSubscription();
        }