protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);
            global::Xamarin.Auth.Presenters.XamarinAndroid.AuthenticationConfiguration.Init(this, savedInstanceState);
            GoogleClientManager.Initialize(this);
            if (Intent.Extras != null)
            {
                foreach (var key in Intent.Extras.KeySet())
                {
                    if (key != null)
                    {
                        var value = Intent.Extras.GetString(key);
                        Log.Debug(TAG, "Key: {0} Value: {1}", key, value);
                    }
                }
            }

            IsPlayServicesAvailable();
            CreateNotificationChannel();

            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            Xamarin.FormsMaps.Init(this, savedInstanceState);
            Window.SetStatusBarColor(Android.Graphics.Color.ParseColor(InfiniteMeals.Models.Constants.PrimaryColor.ToHex()));
            LoadApplication(new App());
            Window.SetStatusBarColor(Android.Graphics.Color.ParseColor(InfiniteMeals.Models.Constants.PrimaryColor.ToHex()));
            RequestPermissions(permissionGroup, 0);
            UserDialogs.Init(this);
        }
示例#2
0
        public static void Initialize(Activity activity, Bundle bundle)
        {
            Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(activity, bundle);

            CrossAppShortcuts.Current.Init();

            SharpnadoInitializer.Initialize();

            GoogleClientManager.Initialize(activity);
            FacebookClientManager.Initialize(activity);

            Xamarin.Forms.DependencyService.Register <ToastNotification>();
            ToastNotification.Init(activity, new PlatformOptions()
            {
                SmallIconDrawable = Android.Resource.Drawable.IcDialogInfo
            });

            Xamarin.Essentials.Platform.Init(activity, bundle); // add this line to your code, it may also be called: bundle

            //Acr.UserDialogs.UserDialogs.Init(activity);

            CachedImageRenderer.Init(enableFastRenderer: true);
            CachedImageRenderer.InitImageViewHandler();
            //This forces the custom renderers to be used
            //Android.Glide.Forms.Init(activity, debug: false);

            // Override default BitmapDescriptorFactory by your implementation
            FormsGoogleMaps.Init(activity, bundle, new PlatformConfig
            {
                BitmapDescriptorFactory = new CachingNativeBitmapDescriptorFactory()
            });
        }
 public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
 {
     // Override point for customization after application launch.
     // If not required for your application you can safely delete this method
     GoogleClientManager.Initialize();
     return(true);
 }
示例#4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);
            var clientId = "126413075708-3el4vijpiue3od7mkegv6mk9h5ap0a4n.apps.googleusercontent.com";

            GoogleClientManager.Initialize(this, null, clientId);
            UserDialogs.Init(this);
            Plugin.Iconize.Iconize.Init();
            Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeRegularModule())
            .With(new Plugin.Iconize.Fonts.FontAwesomeBrandsModule())
            .With(new Plugin.Iconize.Fonts.FontAwesomeSolidModule())
            .With(new Plugin.Iconize.Fonts.MaterialModule());

            ImageCircleRenderer.Init();

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            global::Xamarin.Forms.FormsMaterial.Init(this, savedInstanceState);
            var theme = GetPhoneTheme();

            LoadApplication(new App(theme));
            Xamarin.Forms.Application.Current.On <Xamarin.Forms.PlatformConfiguration.Android>().UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize);
        }
示例#5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            //Author:Omkar - Carousel View,FacebookClientManager Init
            Forms.SetFlags("CollectionView_Experimental");
            FacebookClientManager.Initialize(this);
            Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
            Plugin.InputKit.Platforms.Droid.Config.Init(this, savedInstanceState);
            Android.Gms.Ads.MobileAds.Initialize(ApplicationContext, "ca-app-pub-2380813622558954/8286981453");
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            //
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);

            //Image
            CrossCurrentActivity.Current.Init(this, savedInstanceState);

            //Author:Omkar - GoogleClientManager Init
            GoogleClientManager.Initialize(this);
            //

            LoadApplication(new App());
        }
示例#6
0
        protected override async void OnCreate(Bundle bundle)
        {
            try
            {
                //TabLayoutResource = Resource.Layout.Tabbar;
                //ToolbarResource = Resource.Layout.Toolbar;

                base.OnCreate(bundle);

                //FacebookSdk.SdkInitialize(this.ApplicationContext);
                //AsNumAssemblyHelper.HoldAssembly();

                FacebookClientManager.Initialize(this);
                GoogleClientManager.Initialize(this);

                await CrossMedia.Current.Initialize();

                Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(this, bundle);

                Forms.Init(this, bundle);
                Xamarin.FormsMaps.Init(this, bundle);

                instance = this;

                LoadApplication(new App());
            }
            catch (Exception e)
            {
                Log.Debug("Error", e.Message);
            }
        }
 //
 // 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();
     GoogleClientManager.Initialize();
     LoadApplication(new App());
     return(base.FinishedLaunching(app, options));
 }
示例#8
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            Window.SetStatusBarColor(Android.Graphics.Color.ParseColor("#607d8b"));

            base.OnCreate(bundle);
            //ZXing.Net.Mobile.Forms.Android.Platform.Init();
            Rg.Plugins.Popup.Popup.Init(this, bundle);

            //Facebook Plugin
            FacebookClientManager.Initialize(this);

            GoogleClientManager.Initialize(this);

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


            //Carousel view package inint
            //CarouselViewRenderer.Init();

            //Pancakeview package(gradients)
            PancakeViewRenderer.Init();

            //Location Services permission Android
            CrossCurrentActivity.Current.Init(this, bundle);

            Xamarin.Auth.Presenters.XamarinAndroid.AuthenticationConfiguration.Init(this, bundle);

            LoadApplication(new App());
        }
示例#9
0
 private void InitControls(Bundle savedInstanceState)
 {
     Xamarin.Essentials.Platform.Init(this, savedInstanceState);
     global::Xamarin.Forms.Forms.SetFlags("FastRenderers_Experimental");
     FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true);
     GoogleClientManager.Initialize(this, AppSettingsManager.Settings[Constants.GoogleAndroidClientId], AppSettingsManager.Settings[Constants.GoogleAndroidClientId]);
     global::Xamarin.Auth.Presenters.XamarinAndroid.AuthenticationConfiguration.Init(this, savedInstanceState);
 }
示例#10
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.SetFlags("Expander_Experimental");
            global::Xamarin.Forms.Forms.Init();
            GoogleClientManager.Initialize();
            LoadApplication(new App(new iOSInitializer()));

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

            base.OnCreate(bundle);
            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App(new AndroidInitializer()));
            GoogleClientManager.Initialize(this);
        }
示例#12
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);
            GoogleClientManager.Initialize(this, null, "505504259657-mm99o1b838kmbrnkabshqpf5fd00sbsf.apps.googleusercontent.com");
            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());
        }
示例#13
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();
            global::Xamarin.FormsMaps.Init(); //For the Google map.

            GoogleClientManager.Initialize(); //For the Google auth.

            LoadApplication(new App(new IosInitializer()));

            return(base.FinishedLaunching(app, options));
        }
示例#14
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);
            GoogleClientManager.Initialize(this);

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App());
        }
示例#15
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            var density = Resources.DisplayMetrics.Density;

            App.screenWidth  = Resources.DisplayMetrics.WidthPixels / density;
            App.screenHeight = Resources.DisplayMetrics.HeightPixels / density;

            if (Xamarin.Forms.Device.Idiom == TargetIdiom.Phone)
            {
                App.screenHeight = (16 * App.screenWidth) / 9;
            }

            if (Xamarin.Forms.Device.Idiom == TargetIdiom.Tablet)
            {
                App.screenWidth = (9 * App.screenHeight) / 16;
            }

            try
            {
                PackageInfo info = Android.App.Application.Context.PackageManager.GetPackageInfo(Android.App.Application.Context.PackageName, PackageInfoFlags.Signatures);
                foreach (var signature in info.Signatures)
                {
                    MessageDigest md = MessageDigest.GetInstance("SHA");
                    md.Update(signature.ToByteArray());
                    System.Diagnostics.Debug.WriteLine("helloWorld");
                    System.Diagnostics.Debug.WriteLine(Convert.ToBase64String(md.Digest()));
                }
            }
            catch (NoSuchAlgorithmException e)
            {
                System.Diagnostics.Debug.WriteLine(e);
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine(e);
            }

            PrintHashKey(this);

            FacebookSdk.ApplicationId = "244197793511500";
            FacebookSdk.SdkInitialize(this);
            FacebookClientManager.Initialize(this);
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;
            FirebaseApp.InitializeApp(this);
            base.OnCreate(savedInstanceState);

            GoogleClientManager.Initialize(this);

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App());
        }
示例#16
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            UserDialogs.Init(this);
            SetContentView(Resource.Layout.activity_main);
            BottomNavigationView navigation = FindViewById <BottomNavigationView>(Resource.Id.navigation);

            navigation.SetOnNavigationItemSelectedListener(this);
            GoogleClientManager.Initialize(this);
            CrossGoogleClient.Current.LoginAsync();
            CreateNotificationChannel();
        }
示例#17
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            Xamarin.Forms.Forms.SetFlags("Expander_Experimental");

            base.OnCreate(savedInstanceState);

            GoogleClientManager.Initialize(this);
            Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            CrossCurrentActivity.Current.Init(this, savedInstanceState);
            LoadApplication(new App(new AndroidInitializer()));
        }
示例#18
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);
            CrossCurrentActivity.Current.Init(this, savedInstanceState);
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer: true);
            LoadApplication(new App());

            GoogleClientManager.Initialize(this);
        }
        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);
            Lottie.Forms.Droid.AnimationViewRenderer.Init();
            GoogleClientManager.Initialize(this);
            Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
            LoadApplication(new App());
            IsPlayServicesAvailable();
        }
示例#20
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);
            AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
            TaskScheduler.UnobservedTaskException      += TaskSchedulerOnUnobservedTaskException;

            //GoogleClientManager.Initialize(this, null, Constants.GoogleAndroidClientId);
            GoogleClientManager.Initialize(this, Constants.GoogleAndroidClientId, Constants.GoogleAndroidClientId);
            DisplayCrashReport();
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            global::Xamarin.Auth.Presenters.XamarinAndroid.AuthenticationConfiguration.Init(this, savedInstanceState);
            LoadApplication(new App());
        }
示例#21
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)
        {
            Forms.SetFlags("CollectionView_Experimental");
            global::Xamarin.Forms.Forms.Init();
            GoogleClientManager.Initialize();
            this.LoadApplication(new App());
            SfButtonRenderer.Init();
            SfCheckBoxRenderer.Init();
            SfBorderRenderer.Init();
            SfGradientViewRenderer.Init();
            SfListViewRenderer.Init();
            SfRatingRenderer.Init();
            SfRotatorRenderer.Init();
            SfComboBoxRenderer.Init();
            SfRadioButtonRenderer.Init();
            SfPopupLayoutRenderer.Init();
            SfExpanderRenderer.Init();
            SfCardViewRenderer.Init();
            SfBadgeViewRenderer.Init();
            SfSegmentedControlRenderer.Init();
            Core.Init();
            new SfMapsRenderer();
            SfTabViewRenderer.Init();
            SfCalendarRenderer.Init();
            SfLinearProgressBarRenderer.Init();
            SfChartRenderer.Init();
            SfGaugeRenderer.Init();

            ////UIView statusBar = UIApplication.SharedApplication.ValueForKey(new NSString("statusBar")) as UIView;
            ////if (statusBar.RespondsToSelector(new ObjCRuntime.Selector("setBackgroundColor:")))
            ////{
            ////    statusBar.BackgroundColor = Color.FromHex("#e83f94").ToUIColor();
            ////    statusBar.TintColor = UIColor.White;
            ////}

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

            var safeAreInset = UIApplication.SharedApplication.KeyWindow.SafeAreaInsets;

            if (safeAreInset.Top > 0)
            {
                AppSettings.Instance.IsSafeAreaEnabled = true;
                AppSettings.Instance.SafeAreaHeight    = safeAreInset.Top;
            }

            return(result);
        }
        //
        // 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();

            // Initializing the GoogleClient plugin
            GoogleClientManager.Initialize(null, "205430491915-fotkdlnd7tn6e0m52as34782hb4cq9se.apps.googleusercontent.com");

            SharpnadoInitializer.Initialize();

            // Getting the folder path that already exist on the device and will be used to map a location to our database.
            string folderPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
            // Combining the two paths to create a completed path
            string completedPath = Path.Combine(folderPath, Data.Config.DATABASE_NAME);

            LoadApplication(new App(completedPath));

            return(base.FinishedLaunching(app, options));
        }
示例#23
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            ServicePointManager.ServerCertificateValidationCallback = delegate { return(true); };
            Xamarin.Forms.Forms.SetFlags("CarouselView_Experimental");
            TabLayoutResource    = Resource.Layout.Tabbar;
            ToolbarResource      = Resource.Layout.Toolbar;
            RequestedOrientation = ScreenOrientation.Portrait;

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

            string client_id = Resources.GetString(Resource.String.Google_ClientID);

            GoogleClientManager.Initialize(this, client_id, client_id);
            LoadApplication(new App());
        }
示例#24
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);
            FacebookClientManager.Initialize(this);
            GoogleClientManager.Initialize(this);
            UserDialogs.Init(() => this);
            LoadApplication(new App(new OAuth2Service()));
            #if DEBUG
            PrintHashKey(this);
            #endif
        }
示例#25
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.MainView);

            GoogleClientManager.Initialize(
                this
                , clientId: Configuration.GoogleClientIdDroid
                );

            // [START customize_button]
            // Set the dimensions of the sign-in button.
            var signInButton = FindViewById <SignInButton>(Resource.Id.sign_in_button);

            signInButton.SetSize(SignInButton.SizeWide);
            //signInButton.Click += (s, e) => CrossGoogleClient.Current.LoginAsync();
            // [END customize_button]
        }
示例#26
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;
            var intent = new Intent(ApplicationContext, typeof(PeriodicService));
            var source = PendingIntent.GetBroadcast(ApplicationContext, 0, intent, 0);

            StartService(intent);
            //PeriodicService.EnqueueWork(ApplicationContext, new Intent());
            PrintHashKey();
            base.OnCreate(savedInstanceState);
            GoogleClientManager.Initialize(this);
            //_bleServer = new BleServer(this.ApplicationContext);
            Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            FirebasePushNotificationManager.ProcessIntent(this, Intent);
            ImageCircleRenderer.Init();
            LoadApplication(new App());
        }
示例#27
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            #region Generate HashKey - Do once, unless needing a newer one
            //try
            //{
            //    PackageInfo info = Android.App.Application.Context.PackageManager.GetPackageInfo(Android.App.Application.Context.PackageName, PackageInfoFlags.Signatures);
            //    foreach (var signature in info.Signatures)
            //    {
            //        MessageDigest md = MessageDigest.GetInstance("SHA");
            //        md.Update(signature.ToByteArray());

            //        //Facebook
            //        string st = "Facebook: " + Convert.ToBase64String(md.Digest());
            //        //Google
            //        string st2 = "Google: " + BitConverter.ToString(md.Digest()).Replace("-", ":");

            //    }
            //}
            //catch (NoSuchAlgorithmException e)
            //{
            //    System.Diagnostics.Debug.WriteLine(e);
            //}
            //catch (Exception e)
            //{
            //    System.Diagnostics.Debug.WriteLine(e);
            //}
            #endregion

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            //Initialize Socal plugins
            FacebookClientManager.Initialize(this);
            GoogleClientManager.Initialize(this);



            LoadApplication(new App());
        }
示例#28
0
        public static void Initialize(UIApplication app, NSDictionary options)
        {
            iOSShinyHost.Init(new ShinyAppStartup());

            GoogleClientManager.Initialize();
            FacebookClientManager.Initialize(app, options);


            Xamarin.Forms.DependencyService.Register <ToastNotification>();
            ToastNotification.Init();

            CachedImageRenderer.Init();
            FFImageLoading.FormsHandler.Init(debug: false);
            CachedImageRenderer.InitImageSourceHandler();

            // Override default ImageFactory by your implementation.
            FormsGoogleMaps.Init(Config.GoogleMapKeyiOS, new PlatformConfig
            {
                ImageFactory = new CachingImageFactory()
            });
            SharpnadoInitializer.Initialize();
            // Syncfusion
            SfButtonRenderer.Init();
            SfRotatorRenderer.Init();
            SfEffectsViewRenderer.Init();
            SfSegmentedControlRenderer.Init();
            //SfListViewRenderer.Init();
            //SfPickerRenderer.Init();
            //SfDataGridRenderer.Init();
            //SfCheckBoxRenderer.Init();
            //SfComboBoxRenderer.Init();
            //SfPullToRefreshRenderer.Init();
            //SfImageEditorRenderer.Init();
            //SfCalendarRenderer.Init();
            //SfBadgeViewRenderer.Init();
            //SfChartRenderer.Init();
            //SfBusyIndicatorRenderer.Init();
            //SfTabViewRenderer.Init();
            //SfRatingRenderer.Init();
            //SfPopupLayoutRenderer.Init();
            //SfMapsRenderer.Init();
        }
示例#29
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            GoogleClientManager.Initialize(this);
            FacebookClientManager.Initialize(this);

            global::Xamarin.Forms.Forms.SetFlags("Shell_Experimental", "Visual_Experimental", "CollectionView_Experimental");
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            //global::Xamarin.Auth.Presenters.XamarinAndroid.AuthenticationConfiguration.Init(this, savedInstanceState);

            /* This is for getting the KeyStore ID */
            try
            {
                PackageInfo info = Android.App.Application.Context.PackageManager.GetPackageInfo(Android.App.Application.Context.PackageName, PackageInfoFlags.Signatures);

                foreach (var signature in info.Signatures)
                {
                    MessageDigest md = MessageDigest.GetInstance("SHA");
                    md.Update(signature.ToByteArray());
                    var output = Convert.ToBase64String(md.Digest());
                    System.Diagnostics.Debug.WriteLine(output);
                }
            }
            catch (NoSuchAlgorithmException e)
            {
                System.Diagnostics.Debug.WriteLine(e);
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine(e);
            }

            LoadApplication(new App());
        }
示例#30
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;
            //this will make it full screen and take off the blue bar
            this.Window.AddFlags(WindowManagerFlags.Fullscreen | WindowManagerFlags.TurnScreenOn);
            if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
            {
                var stBarHeight = typeof(FormsAppCompatActivity).GetField("statusBarHeight", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
                if (stBarHeight == null)
                {
                    stBarHeight = typeof(FormsAppCompatActivity).GetField("_statusBarHeight", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
                }
                stBarHeight?.SetValue(this, 0);
            }
            //end
            base.OnCreate(savedInstanceState);

            GoogleClientManager.Initialize(this);

            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App());
        }