Esempio n. 1
0
        protected override void OnCreate(Bundle bundle)
        {
            var db = Realm.GetInstance();

            db.Dispose();
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

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

            Window window = this.Window;

            window.ClearFlags(WindowManagerFlags.TranslucentStatus);
            window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);
            window.SetStatusBarColor(Android.Graphics.Color.Rgb(251, 67, 60));
            LoadApplication(new App());
            TintedImageRenderer.Init();
            CarouselViewRenderer.Init();
            RoundedBoxViewRenderer.Init();
            CachedImageRenderer.Init(enableFastRenderer: true);

            OneSignal.Current.StartInit("84ec0128-74a1-40f9-89b1-35e35da35acd")
            .EndInit();

            if (IsPlayServicesAvailable())
            {
                var intent = new Intent(this, typeof(RegistrationIntentService));
                StartService(intent);
            }
        }
Esempio n. 2
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            if (UIDevice.CurrentDevice.CheckSystemVersion(10, 0))
            {
                // Ask the user for permission to get notifications on iOS 10.0+
                UNUserNotificationCenter.Current.RequestAuthorization(
                    UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound,
                    (approved, error) => { });
            }
            else if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
            {
                // Ask the user for permission to get notifications on iOS 8.0+
                var settings = UIUserNotificationSettings.GetSettingsForTypes(
                    UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound,
                    new NSSet());

                UIApplication.SharedApplication.RegisterUserNotificationSettings(settings);
            }

            global::Xamarin.Forms.Forms.Init();
            CarouselViewRenderer.Init();
            TintedImageRenderer.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;

            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());
        }
Esempio n. 4
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.Init();
            CarouselViewRenderer.Init();
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
            Xamarin.FormsMaps.Init();
            Rg.Plugins.Popup.Popup.Init();
            TintedImageRenderer.Init();
            UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum);

            Distribute.DontCheckForUpdatesInDebug();
            //AppCenter.Start("{Your Xamarin iOS App Secret}", typeof(Distribute));

            try
            {
                LoadApplication(new App(new IOSInitializer()));
            }
            catch (Exception ex)
            {
                Crashes.TrackError(ex);
            }
            WireUpLongRunningTask();

            return(base.FinishedLaunching(app, options));
        }
Esempio n. 5
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();
            TintedImageRenderer.Init();

            LoadApplication(new App());

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

            base.OnCreate(savedInstanceState);
            Xamarin.Forms.Forms.Init(this, savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            TintedImageRenderer.Init();
            LoadApplication(new App());
        }
Esempio n. 7
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Rg.Plugins.Popup.Popup.Init();
            Forms.Init();
            AnimationViewRenderer.Init();
            TintedImageRenderer.Init();
            FormsControls.Touch.Main.Init();
            LoadApplication(new App());
            IQKeyboardManager.IQKeyboardManager.SharedManager.Enable = true;

            return(base.FinishedLaunching(app, options));
        }
Esempio n. 8
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);
            TintedImageRenderer.Init();

            LoadApplication(new App());
        }
Esempio n. 9
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;

            ToolbarResource = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            HtmlLabelRenderer.Initialize();

            Window.AddFlags(WindowManagerFlags.KeepScreenOn);

            Xamarin.Essentials.Platform.Init(this, bundle);

            Rg.Plugins.Popup.Popup.Init(this, bundle);

            //AnimationViewRenderer.Init();

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

            CrossCurrentActivity.Current.Init(this, bundle);

            if (CrossMediaManager.Current == null)
            {
                CrossMediaManager.Current = new MediaManagerImplementation();
            }

            // use custom Android notifications
            CrossMediaManager.Current.MediaNotificationManager = new PVLMediaNotificationManager(Android.App.Application.Context, typeof(ExoPlayerAudioService));
            //CrossMediaManager.Current.MediaNotificationManager = new PVLMediaNotificationManager(Android.App.Application.Context, typeof(MediaPlayerService));

            // use exoPlayer
            MediaManagerImplementation current = CrossMediaManager.Current as MediaManagerImplementation;
            var exoPlayer = new ExoPlayerAudioImplementation(current.MediaSessionManager);

            CrossMediaManager.Current.AudioPlayer = exoPlayer;

            CrossNotifications.Current.GetType();

            TintedImageRenderer.Init();

            var s = new SfPickerRenderer();

            VideoViewRenderer.Init();

            CarouselViewRenderer.Init();

            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(false);

            BlobCache.ApplicationName = "Medit";

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

            base.SetTheme(Resource.Style.MainTheme);
            base.OnCreate(bundle);

            TintedImageRenderer.Init();

            NavigateToRequestIfPresent(Intent);
        }
Esempio n. 11
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);
            CarouselViewRenderer.Init();
            TintedImageRenderer.Init();

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

            base.OnCreate(savedInstanceState);

            Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
            TintedImageRenderer.Init();
            global::Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental");
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            SharpnadoInitializer.Initialize();
            LoadApplication(new App());
        }
Esempio n. 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)
        {
            #region plugin init
            Rg.Plugins.Popup.Popup.Init();
            Stormlion.PhotoBrowser.iOS.Platform.Init();
            XLabsInit();
            TintedImageRenderer.Init();
            #endregion

            Xamarin.Calabash.Start();
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());
            KeyboardOverlapRenderer.Init();
            return(base.FinishedLaunching(app, options));
        }
Esempio n. 14
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Settings.AppID       = "1840011542984981";
            Settings.DisplayName = "Xama­r­i­n­F­o­r­m­s­N­a­t­i­v­e­L­ogin";

            Rox.VideoIos.Init();

            HtmlLabelRenderer.Initialize();

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

            Rg.Plugins.Popup.Popup.Init();

            TintedImageRenderer.Init();

            CrossMediaManager.Current = new MediaManagerImplementation();

            ProgressRingRenderer.Init();

            CarouselViewRenderer.Init();

            SfPickerRenderer.Init();

            Akavache.BlobCache.ApplicationName = "Medit";

            AnimationViewRenderer.Init();

            CachedImageRenderer.Init();

            LoadApplication(new App());

            ApplicationDelegate.SharedInstance.FinishedLaunching(app, options);

            UITabBar.Appearance.TintColor = ((Xamarin.Forms.Color)Xamarin.Forms.Application.Current.Resources["primaryDark"]).ToUIColor();
            UITabBar.Appearance.SelectedImageTintColor = ((Xamarin.Forms.Color)Xamarin.Forms.Application.Current.Resources["primaryDark"]).ToUIColor();
            UISwitch.Appearance.OnTintColor            = ((Xamarin.Forms.Color)Xamarin.Forms.Application.Current.Resources["primary"]).ToUIColor();

            //UINavigationBar.Appearance.TintColor = ((Xamarin.Forms.Color)Xamarin.Forms.Application.Current.Resources["primaryDark"]).ToUIColor(); //Tint color of button items
            //UIBarButtonItem.Appearance.TintColor = ((Xamarin.Forms.Color)Xamarin.Forms.Application.Current.Resources["primaryDark"]).ToUIColor(); //Tint color of button items

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

            UIApplication.SharedApplication.StatusBarHidden = false;

            return(result);
        }
Esempio n. 15
0
        /// <summary>
        /// Invoked when the application is launched normally by the end user.  Other entry points
        /// will be used such as when the application is launched to open a specific file.
        /// </summary>
        /// <param name="e">Details about the launch request and process.</param>
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                this.DebugSettings.EnableFrameRateCounter = false;
            }
#endif

            Frame rootFrame = Window.Current.Content as Frame;

            // Do not repeat app initialization when the Window already has content,
            // just ensure that the window is active
            if (rootFrame == null)
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;

                Xamarin.Forms.Forms.Init(e);
                TintedImageRenderer.Init();

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    //TODO: Load state from previously suspended application
                }

                // Place the frame in the current Window
                Window.Current.Content = rootFrame;
            }

            if (rootFrame.Content == null)
            {
                // When the navigation stack isn't restored navigate to the first page,
                // configuring the new page by passing required information as a navigation
                // parameter
                rootFrame.Navigate(typeof(MainPage), e.Arguments);
            }
            // Ensure the current window is active
            Window.Current.Activate();
        }
Esempio n. 16
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            Popup.Init(this, bundle);
            TintedImageRenderer.Init();
            Forms.Init(this, bundle);

            var app = new App();

            LoadApplication(app);

            var colorPrimaryDark = (Color)App.Current.Resources["ColorPrimaryDark"];

            Window.SetStatusBarColor(colorPrimaryDark.ToAndroid());

            if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
            {
                //Window.ClearFlags(WindowManagerFlags.TranslucentStatus);
                //Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);
                //Window.SetStatusBarColor(Android.Graphics.Color.Blue);
            }

            if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
            {
                //Window.AddFlags(WindowManagerFlags.LayoutNoLimits);
                //Window.AddFlags(WindowManagerFlags.LayoutInScreen);
                //Window.DecorView.SetFitsSystemWindows(true);
                //var statusBarHeightInfo = typeof(FormsAppCompatActivity).GetField("_statusBarHeight", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);

                //statusBarHeightInfo?.SetValue(this, 0);

                //Toolbar myToolbar = (Toolbar)FindViewById(ToolbarResource);
            }

            _toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(_toolbar);
        }
Esempio n. 17
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);
        }
Esempio n. 18
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));
        }
Esempio n. 19
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;
            // RequestLocationWithDisclosure();
            base.OnCreate(savedInstanceState);

            this.SetStatusBarColor(Android.Graphics.Color.Black);

            global::Xamarin.Forms.Forms.SetFlags("Shapes_Experimental");

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
            UserDialogs.Init(this);
            AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
            TaskScheduler.UnobservedTaskException      += TaskSchedulerOnUnobservedTaskException;
            CrossCurrentActivity.Current.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            TintedImageRenderer.Init();

            LoadApplication(new App());
        }
Esempio n. 20
0
        protected override void OnCreate(Bundle bundle)
        {
            base.Window.RequestFeature(WindowFeatures.ActionBar);

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

            base.OnCreate(bundle);
            myActivity = this;

            Forms.SetFlags("FastRenderers_Experimental");

            Forms.Init(this, bundle);
            UserDialogs.Init(this);
            CarouselViewRenderer.Init();
            Rg.Plugins.Popup.Popup.Init(this, bundle);
            try
            {
                FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true);
            }
            catch (Exception)
            {
            }
            Xamarin.FormsMaps.Init(this, bundle);
            TintedImageRenderer.Init();
            Xamarin.Essentials.Platform.Init(this, bundle);
            CrossCurrentActivity.Current.Init(this, bundle);

            try
            {
                LoadApplication(new App(new AndroidInitializer()));
            }
            catch (Exception ex)
            {
                Crashes.TrackError(ex);
            }

            WireUpLongRunningTask();
        }
Esempio n. 21
0
        /// <summary>
        /// Invoked when the application is launched normally by the end user.  Other entry points
        /// will be used such as when the application is launched to open a specific file.
        /// </summary>
        /// <param name="e">Details about the launch request and process.</param>
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
            // Do not repeat app initialization when the Window already has content,
            // just ensure that the window is active
            if (!(Window.Current.Content is Frame rootFrame))
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;

                List <Assembly> assembliesToInclude = new List <Assembly>
                {
                    typeof(CarouselViewRenderer).GetTypeInfo().Assembly
                };
                Xamarin.Forms.Forms.Init(e, assembliesToInclude);

                TintedImageRenderer.Init();
                FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
                Rg.Plugins.Popup.Popup.Init();
                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    //TODO: Load state from previously suspended application
                }

                // Place the frame in the current Window
                Window.Current.Content = rootFrame;
            }

            if (rootFrame.Content == null)
            {
                // When the navigation stack isn't restored navigate to the first page,
                // configuring the new page by passing required information as a navigation
                // parameter
                rootFrame.Navigate(typeof(MainPage), e.Arguments);
            }
            // Ensure the current window is active
            Window.Current.Activate();
        }
        //
        // 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();
            ImageCircleRenderer.Init();

            var statusBar = UIApplication.SharedApplication.ValueForKey(new NSString("statusBar")) as UIView;

            if (statusBar.RespondsToSelector(new ObjCRuntime.Selector("setBackgroundColor:")))
            {
                statusBar.BackgroundColor = UIColor.FromRGB(251, 67, 60);
                statusBar.TintColor       = UIColor.White;
            }
            LoadApplication(new App());
            TintedImageRenderer.Init();
            CachedImageRenderer.Init();
            RoundedBoxViewRenderer.Init();
            CarouselViewRenderer.Init();
            KeyboardOverlapRenderer.Init();

            OneSignal.Current.StartInit("84ec0128-74a1-40f9-89b1-35e35da35acd")
            .EndInit();

            return(base.FinishedLaunching(app, options));
        }
Esempio n. 23
0
        protected override void OnCreate(Bundle bundle)
        {
            base.Window.RequestFeature(WindowFeatures.ActionBar);

            TabLayoutResource = Android.Resource.Layout.Tabbar;
            ToolbarResource   = Android.Resource.Layout.Toolbar;

            base.OnCreate(bundle);
            myActivity = this;

            FormsMaterial.Init(this, bundle);
            UserDialogs.Init(this);
            Rg.Plugins.Popup.Popup.Init(this, bundle);
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true);
            Xamarin.FormsMaps.Init(this, bundle);
            TintedImageRenderer.Init();
            Xamarin.Essentials.Platform.Init(this, bundle);
            CrossCurrentActivity.Current.Init(this, bundle);
            Forms9Patch.Droid.Settings.Initialize(this);
            SegmentedControlRenderer.Init();
            Forms.Init(this, bundle);
            LoadApplication(new App());
            GetAccessCoarseLocationPermission();
        }