Ejemplo n.º 1
0
 public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
 {
     Forms.Init();
     PinItemViewRenderer.Init();
     LoadApplication(new App());
     return(base.FinishedLaunching(uiApplication, launchOptions));
 }
Ejemplo n.º 2
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);
            global::ZXing.Net.Mobile.Forms.Android.Platform.Init();

            PinItemViewRenderer.Init();
            //DatabaseAccess newDb = new DatabaseAccess();
            //string path = newDb.DatabasePath();
            if (Device.Idiom == TargetIdiom.Phone)              //Lock Screen
            {
                RequestedOrientation = ScreenOrientation.Portrait;
            }
            else
            {
                /*RequestedOrientation = ScreenOrientation.SensorLandscape*/;
                RequestedOrientation = ScreenOrientation.Portrait;
            }

            LoadApplication(new App());
        }
        //
        // 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)
        {
            Xamarin.Forms.Forms.SetFlags("IndicatorView_Experimental");
            Rg.Plugins.Popup.Popup.Init();
            Xamarin.Forms.Forms.Init();

            UNUserNotificationCenter.Current.Delegate = new iOSNotificationReceiver();
            PinItemViewRenderer.Init();

            // Initializing FFImageLoading
            CachedImageRenderer.Init();

#if GORILLA
            LoadApplication(UXDivers.Gorilla.iOS.Player.CreateApplication(
                                new UXDivers.Gorilla.Config("Good Gorilla")
                                .RegisterAssemblyFromType <InverseBooleanConverter>()
                                .RegisterAssemblyFromType <FFImageLoading.Transformations.CircleTransformation>()
                                .RegisterAssemblyFromType <FFImageLoading.Forms.CachedImage>()
                                ));
#else
            // Initializing QR Code Scanning support
            ZXing.Net.Mobile.Forms.iOS.Platform.Init();

            var host = App
                       .BuildHost(typeof(PlatformModule).Assembly)
                       .Build();

            _application = host.Services.GetRequiredService <App>();
            LoadApplication(_application);
#endif
            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 4
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();

            LoadApplication(new App());
            PinItemViewRenderer.Init();
            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 5
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);
     PinItemViewRenderer.Init();
     this.LoadApplication(new App());
 }
Ejemplo n.º 6
0
 protected override void OnCreate(Bundle bundle)
 {
     FormsAppCompatActivity.TabLayoutResource = Resource.Layout.Tabbar;
     FormsAppCompatActivity.ToolbarResource   = Resource.Layout.Toolbar;
     base.OnCreate(bundle);
     Forms.Init(this, bundle);
     PinItemViewRenderer.Init();
     this.LoadApplication(new App());
 }
Ejemplo n.º 7
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     Rg.Plugins.Popup.Popup.Init(this);
     Xamarin.Essentials.Platform.Init(this, savedInstanceState);
     global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
     //   XamForms.Controls.< PLATFORM >.Calendar.Init();
     LocalNotificationsImplementation.NotificationIconId = Resource.Drawable.emotion;
     AiForms.Renderers.Droid.SettingsViewInit.Init(); // need to write here
     PinItemViewRenderer.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);
            Forms.SetFlags("IndicatorView_Experimental");
            Forms.Init(this, bundle);

            PinItemViewRenderer.Init();

            Acr.UserDialogs.UserDialogs.Init(this);
            // Initializing FFImageLoading
            CachedImageRenderer.Init(false);
            Rg.Plugins.Popup.Popup.Init(this, bundle);
            // Initializing Xamarin Essentials
            Xamarin.Essentials.Platform.Init(this, bundle);



            // Initializing QR Code Scanning support
            ZXing.Net.Mobile.Forms.Android.Platform.Init();
            ZXing.Mobile.MobileBarcodeScanner.Initialize(Application);

#if GORILLA
            LoadApplication(UXDivers.Gorilla.Droid.Player.CreateApplication(
                                this,
                                new UXDivers.Gorilla.Config("Good Gorilla")
                                .RegisterAssemblyFromType <Converters.InverseBooleanConverter>()
                                .RegisterAssemblyFromType <FFImageLoading.Transformations.CircleTransformation>()
                                .RegisterAssemblyFromType <FFImageLoading.Forms.CachedImage>()
                                ));
#else
            // Initializing User Dialogs
            // Android requires that we set content root.
            var host = App.BuildHost(typeof(PlatformModule).Assembly)
                       .UseContentRoot(System.Environment.GetFolderPath(
                                           System.Environment.SpecialFolder.Personal)).Build();

            LoadApplication(host.Services.GetRequiredService <App>());
            Window.SetStatusBarColor(Android.Graphics.Color.Argb(255, 0, 0, 0));
#endif

            //Loading dependent libindy
            JavaSystem.LoadLibrary("c++_shared");
            JavaSystem.LoadLibrary("indy");
            CreateNotificationFromIntent(Intent);
            CheckAndRequestRequiredPermissions();
        }
Ejemplo n.º 9
0
        public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
        {
            global::Xamarin.Forms.Forms.Init();
            PinItemViewRenderer.Init();
            // Code for starting up the Xamarin Test Cloud Agent
#if DEBUG
            Xamarin.Calabash.Start();
#endif

            AnimationViewRenderer.Init();

            LoadApplication(new App(new iOSInitializer()));

            return(base.FinishedLaunching(uiApplication, launchOptions));
        }
Ejemplo n.º 10
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);
            PinItemViewRenderer.Init();

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

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

            LoadApplication(new App());
        }
Ejemplo n.º 11
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);

            Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer: true);
            CarouselViewRenderer.Init();
            NControl.Droid.NControlViewRenderer.Init();
            PinItemViewRenderer.Init();

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

            UINavigationBar.Appearance.TitleTextAttributes = new UIStringAttributes
            {
                ForegroundColor = UIColor.Green
            };

            // iOS 10 or later
            var authOptions = UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound;

            UNUserNotificationCenter.Current.RequestAuthorization(authOptions, (granted, error) => {
                Console.WriteLine(granted);
            });

            UIApplication.SharedApplication.RegisterForRemoteNotifications();

            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 13
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Rg.Plugins.Popup.IOS.Popup.Init();

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

            PinItemViewRenderer.Init();

            LoadApplication(new App());

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

            var manager = BITHockeyManager.SharedHockeyManager;

            manager.Configure("$com.RedbellyBlockchain.XamarinRbbcClient");
            manager.DisableMetricsManager = true;

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


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

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

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

            LoadApplication(new App());

            if (Intent.Extras != null)
            {
                foreach (var key in Intent.Extras.KeySet())
                {
                    var value = Intent.Extras.GetString(key);
                    Log.Debug(TAG, "Key: {0} Value: {1}", key, value);
                }
            }

            ServicePointManager.ServerCertificateValidationCallback += (o, cert, chain, errors) => true;

            var id = await AppCenter.GetInstallIdAsync();

            Log.Debug(id.ToString(), id.ToString());

            //var data = JsonConvert.SerializeObject(new
            //{
            //    Token = id.ToString()
            //});
            //var client = new HttpClient();
            //await client.PostAsync("http://10.0.2.2:3000/register",
            //    new StringContent(data, Encoding.UTF8, "application/json"));
        }