Exemple #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

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

            MessagingCenter.Subscribe <ViewModels.StreamPageViewModel>(this, "landscape", sender =>
            {
                LockRotation(Orientation.Horizontal);
            });

            MessagingCenter.Subscribe <ViewModels.StreamPageViewModel>(this, "portrait", sender =>
            {
                LockRotation(Orientation.Vertical);
            });

            Popup.Init(this, savedInstanceState);

            Forms.Init(this, savedInstanceState);
            AuthenticationConfiguration.Init(this, savedInstanceState);

            if (ApplicationContext.GetSystemService(WifiService) is WifiManager wifiManager)
            {
                WifiLock = wifiManager.CreateWifiLock(WifiMode.FullHighPerf, WifiTag);
                WifiLock.SetReferenceCounted(false);
                WifiLock.Acquire();
            }

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

            base.OnCreate(bundle);

            Forms.Init(this, bundle);

            AuthenticationConfiguration.Init(this, bundle);

            LoadApplication(new App(new TestAppInitializer(this)));
        }
Exemple #3
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);
            CrossCurrentActivity.Current.Activity = this;
            AuthenticationConfiguration.Init(this, bundle);

            LoadApplication(new App());
        }
Exemple #4
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            Xamarin.Essentials.Platform.Init(this, bundle);
            CrossCurrentActivity.Current.Init(this, bundle);
            global::Xamarin.Forms.Forms.Init(this, bundle);
            Xamarin.FormsMaps.Init(this, bundle);
            PlotViewRenderer.Init();
            AuthenticationConfiguration.Init(this, bundle);
            CustomTabsConfiguration.CustomTabsClosingMessage = null;

            LoadApplication(new App());
        }
Exemple #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)
        {
#if DEBUG
            Calabash.Start();
#endif

            Forms.Init();

            AuthenticationConfiguration.Init();
            UIApplication.SharedApplication.StatusBarHidden = false;

            FormsMaps.Init();

            LoadApplication(new App(new PlatformInitializer()));

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

            base.OnCreate(bundle);

            Forms.Init(this, bundle);

            CustomTabsConfiguration.CustomTabsClosingMessage = null;
            AuthenticationConfiguration.Init(this, bundle);
            CrossCurrentActivity.Current.Init(this, bundle);

            FormsMaps.Init(this, bundle);

            LoadApplication(new App(new PlatformInitializer()));
        }
Exemple #7
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);
            Xamarin.Essentials.Platform.Init(this, bundle);
            CrossCurrentActivity.Current.Init(this, bundle);
            global::Xamarin.Forms.Forms.Init(this, bundle);
            CachedImageRenderer.Init(enableFastRenderer: true);
            Xamarin.FormsMaps.Init(this, bundle);
            PlotViewRenderer.Init();
            AuthenticationConfiguration.Init(this, bundle);
            GoogleClientManager.Init(this);
            XamEffects.Droid.Effects.Init();

            LoadApplication(new App());
        }
        /// <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 = true;
            }
#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();
                // Set the default language
                rootFrame.Language = Windows.Globalization.ApplicationLanguages.Languages[0];

                rootFrame.NavigationFailed += OnNavigationFailed;

                Xamarin.Forms.Forms.Init(e); // requires LaunchActivatedEventArgs
                global::Xamarin.Auth._MobileServices.Presenters..AuthenticationConfiguration.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();
        }