Esempio n. 1
0
        protected override void OnCreate(Bundle bundle)
        {
            // Changing to App's theme since we are OnCreate and we are ready to
            // "hide" the splash
            Window.RequestFeature(WindowFeatures.ActionBar);
            SetTheme(Resource.Style.AppTheme);

            ToolbarResource   = Resource.Layout.Toolbar;
            TabLayoutResource = Resource.Layout.Tabs;

            base.OnCreate(bundle);

            ZXing.Net.Mobile.Forms.Android.Platform.Init();

            // Initializing FFImageLoading
            CachedImageRenderer.Init(true);

            Xamarin.Forms.Forms.Init(this, bundle);
            GrialKit.Init(this, "AgateMerchant.Droid.GrialLicense");

            FormsHelper.ForceLoadingAssemblyContainingType(typeof(UXDivers.Effects.Effects));

            locale = Resources.Configuration.Locale;

            LoadApplication(new App());
        }
Esempio n. 2
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            global::Xamarin.Forms.Forms.Init();
            Xamarin.FormsMaps.Init();
            TKCustomMapRenderer.InitMapRenderer();
            NativePlacesApi.Init();
            CachedImageRenderer.Init();             // Initializing FFImageLoading
            AnimationViewRenderer.Init();           // Initializing Lottie
            PullToRefreshLayoutRenderer.Init();
            XFGloss.iOS.Library.Init();
            CarouselViewRenderer.Init();
            // Presenters Initialization
            global::Xamarin.Auth.Presenters.XamarinIOS.AuthenticationConfiguration.Init();

            GrialKit.Init(new ThemeColors(), "Bullytect.iOS.GrialLicense");

            FormsHelper.ForceLoadingAssemblyContainingType(typeof(UXDivers.Effects.Effects));
            FormsHelper.ForceLoadingAssemblyContainingType <UXDivers.Effects.iOS.CircleEffect>();

            var setup = new Setup(this, Window);

            setup.Initialize();

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

            startup.Start();

            LoadApplication(setup.FormsApplication);

            Window.MakeKeyAndVisible();


            FirebasePushNotificationManager.Initialize(options, true);
            // Presentation Options
            FirebasePushNotificationManager.CurrentNotificationPresentationOption = UNNotificationPresentationOptions.Alert | UNNotificationPresentationOptions.Badge;

            var manager = BITHockeyManager.SharedHockeyManager;

            manager.Configure("1b44222db10b498f82e43ddc488bf1d5");
            manager.StartManager();
            manager.Authenticator.AuthenticateInstallation();


            return(true);
        }
Esempio 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)
        {
            // HockeyApp
            var manager = BITHockeyManager.SharedHockeyManager;

            manager.Configure("1578f0ce30e440b98f4478e239d38dd6");
            manager.StartManager();
            HockeyApp.MetricsManager.TrackEvent("Feedback");
            manager.Authenticator.AuthenticateInstallation(); //Obsolete for crash only builds (assuming we're using it for more)

            // Azure
            CurrentPlatform.Init();
            SQLitePCL.CurrentPlatform.Init();

            // WeChat
            WXApi.RegiserApp("wx8b14701dca600e63");
            DependencyService.Register <ILoginServiceWeChat, WeChatService>();

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

            // Push Notifications
            App appToLoad = new App();

            //if (!appToLoad.MockData)
            //{
            //	var pushSettings = UIUserNotificationSettings.GetSettingsForTypes(UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, new NSSet());
            //	UIApplication.SharedApplication.RegisterUserNotificationSettings(pushSettings);
            //	UIApplication.SharedApplication.RegisterForRemoteNotifications();
            //}

            // Grial
            Appearance.Configure();
            GrialKit.Init(new ThemeColors(), "airmily.iOS.GrialLicense");

            // Launch
            LoadApplication(appToLoad);

            UIApplication.SharedApplication.ApplicationSupportsShakeToEdit = true;
            return(base.FinishedLaunching(app, options));
        }
Esempio n. 4
0
        protected override void OnCreate(Bundle bundle)
        {
            try
            {
                ToolbarResource   = Resource.Layout.Toolbar;
                TabLayoutResource = Resource.Layout.Tabs;

                base.OnCreate(bundle);

                App.ScreenWidth  = (int)((int)Resources.DisplayMetrics.WidthPixels / Resources.DisplayMetrics.Density);                // real pixels
                App.ScreenHeight = (int)((int)Resources.DisplayMetrics.HeightPixels / Resources.DisplayMetrics.Density);               // real pixels

                // Required for proper Push notifications handling
                var setupSingleton = MvxAndroidSetupSingleton.EnsureSingletonAvailable(ApplicationContext);
                setupSingleton.EnsureInitialized();

                global::Xamarin.Forms.Forms.Init(this, bundle);
                Xamarin.FormsMaps.Init(this, bundle);
                GrialKit.Init(this, "Bullytect.Droid.GrialLicense");

                // Presenters Initialization
                global::Xamarin.Auth.Presenters.XamarinAndroid.AuthenticationConfiguration.Init(this, bundle);

                // Xamarin.Auth CustomTabs Initialization/Customisation
                global::Xamarin.Auth.CustomTabsConfiguration.ActionLabel                = null;
                global::Xamarin.Auth.CustomTabsConfiguration.MenuItemTitle              = null;
                global::Xamarin.Auth.CustomTabsConfiguration.AreAnimationsUsed          = true;
                global::Xamarin.Auth.CustomTabsConfiguration.IsShowTitleUsed            = false;
                global::Xamarin.Auth.CustomTabsConfiguration.IsUrlBarHidingUsed         = false;
                global::Xamarin.Auth.CustomTabsConfiguration.IsCloseButtonIconUsed      = false;
                global::Xamarin.Auth.CustomTabsConfiguration.IsActionButtonUsed         = false;
                global::Xamarin.Auth.CustomTabsConfiguration.IsActionBarToolbarIconUsed = false;
                global::Xamarin.Auth.CustomTabsConfiguration.IsDefaultShareMenuItemUsed = false;

                global::Android.Graphics.Color color_xamarin_blue;
                color_xamarin_blue = new global::Android.Graphics.Color(0x34, 0x98, 0xdb);
                global::Xamarin.Auth.CustomTabsConfiguration.ToolbarColor = color_xamarin_blue;


                // ActivityFlags for tweaking closing of CustomTabs
                // please report findings!
                global::Xamarin.Auth.CustomTabsConfiguration.
                ActivityFlags =
                    global::Android.Content.ActivityFlags.NoHistory
                    |
                    global::Android.Content.ActivityFlags.SingleTop
                    |
                    global::Android.Content.ActivityFlags.NewTask
                ;

                global::Xamarin.Auth.CustomTabsConfiguration.IsWarmUpUsed   = true;
                global::Xamarin.Auth.CustomTabsConfiguration.IsPrefetchUsed = true;

                UserDialogs.Init(this);
                PullToRefreshLayoutRenderer.Init();
                XFGloss.Droid.Library.Init(this, bundle);
                //Initializing FFImageLoading
                CachedImageRenderer.Init();
                CarouselViewRenderer.Init();
                FormsHelper.ForceLoadingAssemblyContainingType(typeof(UXDivers.Effects.Effects));

                LoadApplication(FormsApplication);
                FirebasePushNotificationManager.ProcessIntent(Intent);

                System.Diagnostics.Debug.WriteLine("Token: " + FirebaseInstanceId.Instance.Token);

                var starter = Mvx.Resolve <IMvxAppStart>();
                starter.Start();

                CrashManager.Register(this, "1a19190547c340aa9e7bf156aa5527ec");
                MetricsManager.Register(Application, "1a19190547c340aa9e7bf156aa5527ec");
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine("**BullTect LAUNCH EXCEPTION**\n\n" + e);
            }
        }