Exemplo n.º 1
0
 protected override void OnCreate(Bundle bundle)
 {
     TabLayoutResource = Resource.Layout.Tabbar;
     ToolbarResource   = Resource.Layout.Toolbar;
     IntSrtatusBar();
     base.OnCreate(bundle);
     Rg.Plugins.Popup.Popup.Init(this, bundle);
     global::Xamarin.Forms.Forms.Init(this, bundle);
     Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(this, bundle);
     FirebaseApp.InitializeApp(Android.App.Application.Context);
     //FirebasePushNotificationManager.ProcessIntent(this, Intent);
     //Firebase
     Xamarin.Essentials.Platform.Init(this, bundle);
     FormsControls.Droid.Main.Init(this);
     LoadApplication(new App());
     mainActivity = this;
     ResizeForKeyBord();
 }
Exemplo n.º 2
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);

            var options = new FirebaseOptions.Builder()
                          .SetApplicationId("1:986776431713:android:4fab5679aa1289b7")
                          .SetApiKey("AIzaSyDLMCTWPYA-BwFQBrm26t7N8rxCDFqSnd4")
                          .Build();

            FirebaseApp.InitializeApp(this, options);

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

            base.OnCreate(bundle);
            IsPlayServicesAvailable();

            var options = new FirebaseOptions.Builder()
                          .SetApplicationId("com.pushnotificationchat.android")
                          .SetApiKey("AIzaSyAoDPF9Qc3fDwppH6-dvc8Acuacs1k5NIA")
                          .SetGcmSenderId("513989846715")
                          .Build();
            var firebaseApp = FirebaseApp.InitializeApp(this, options);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());
        }
Exemplo n.º 4
0
        public void InitFirebase()
        {
            if (_app == null)
            {
                var opt = new FirebaseOptions.Builder()
                          .SetApplicationId("planner-16729")
                          .SetApiKey("AIzaSyApwc838d4MLL5iVzYzvzfe9JG8e7LiO78")
                          .Build();

                _app = FirebaseApp.InitializeApp(Application.Context, opt);

                _auth = FirebaseAuth.Instance;
            }
            else
            {
                _auth = FirebaseAuth.Instance;
            }
        }
Exemplo 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);
            FirebaseApp.InitializeApp(Application.Context);

            FirebaseMessaging.Instance.SubscribeToTopic("announcement");
            FirebaseMessaging.Instance.SubscribeToTopic("survey");

            AndroidContext = this;

            LoadApplication(new App());
        }
Exemplo n.º 6
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            FirebaseApp.InitializeApp(Application.Context);
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer: true);
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            FirebasePushNotificationManager.ProcessIntent(this, Intent);



            base.OnCreate(savedInstanceState);
            Xamarin.Forms.Forms.SetFlags("CarouselView_Experimental");
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App());
            FormsVideoPlayer.Init();
        }
Exemplo n.º 7
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;


            FirebaseApp.InitializeApp(this);                             // TESTING
            CrossCurrentActivity.Current.Init(this, savedInstanceState); // for currentactivity plugin (media add)
            CarouselViewRenderer.Init();
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer: false);


            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            Xamarin.FormsGoogleMaps.Init(this, savedInstanceState); //Initialize GoogleMaps here
            LoadApplication(new App());
        }
Exemplo n.º 8
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            OneSignal.Current.StartInit("7ebb30ca-7bb3-474b-ba30-5f490c4c8041").EndInit();
            FirebaseApp.InitializeApp(this);
            Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
            UserDialogs.Init(this);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental");
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);

            CachedImageRenderer.Init(enableFastRenderer: true);
            LoadApplication(new App());
        }
Exemplo n.º 9
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);
            Xamarin.FormsGoogleMaps.Init(this, savedInstanceState);
            FirebaseApp.InitializeApp(Application.Context);
            LoadApplication(new App(new AndroidInitializer()));

            if (CheckSelfPermission(Manifest.Permission.AccessCoarseLocation) != (int)Permission.Granted)
            {
                RequestPermissions(new string[] { Manifest.Permission.AccessCoarseLocation, Manifest.Permission.AccessFineLocation }, 0);
            }
        }
Exemplo n.º 10
0
    protected override void OnCreate(Bundle savedInstanceState)
    {
        base.OnCreate(savedInstanceState);

        FacebookSdk.SdkInitialize(this.ApplicationContext);
        // Create your application here
        SetContentView(Resource.Layout.layout3);

        FirebaseApp.InitializeApp(this);
        mAuth = FirebaseAuth.Instance;

        LoginButton fblogin = FindViewById <LoginButton>(Resource.Id.fblogin);

        fblogin.SetReadPermissions("email", "public_profile");

        mCallbackManager = CallbackManagerFactory.Create();
        fblogin.RegisterCallback(mCallbackManager, this);
    }
Exemplo n.º 11
0
        public FirebaseFirestore GetDataBase()
        {
            FirebaseFirestore database;

            var options = new FirebaseOptions.Builder()
                          .SetProjectId("firstapp-251018")
                          .SetApplicationId("firstapp-251018")
                          .SetApiKey("AIzaSyD_Kl8ihN6qGGPUdM9LioAsoGme7Xn7REM")
                          .SetDatabaseUrl("https://firstapp-251018.firebaseio.com")
                          .SetStorageBucket("firstapp-251018.appspot.com")
                          .Build();

            var app = FirebaseApp.InitializeApp(this, options);

            database = FirebaseFirestore.GetInstance(app);

            return(database);
        }
Exemplo n.º 12
0
        //Initialize Firebase Auth to application
        private void InitFirebaseAuth()
        {
            app = FirebaseApp.InitializeApp(this);

            var options = new Firebase.FirebaseOptions.Builder()
                          .SetApplicationId("ensemble-65b0c")
                          .SetApiKey("AIzaSyD25wXdD1WxUQGQD3zkXNkf3X9UYJYaAtE")
                          .SetDatabaseUrl("https://ensemble-65b0c.firebaseio.com")
                          .SetStorageBucket("ensemble-65b0c.appspot.com")
                          .Build();

            if (app == null)
            {
                app = FirebaseApp.InitializeApp(this, options);
            }
            mAuth = FirebaseAuth.GetInstance(app);
            Snackbar.Make(activity_main, "Firebase initialized", Snackbar.LengthShort).Show();
        }
Exemplo n.º 13
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                TabLayoutResource = Resource.Layout.Tabbar;
                ToolbarResource   = Resource.Layout.Toolbar;

                base.OnCreate(savedInstanceState);

                Xamarin.Essentials.Platform.Init(this, savedInstanceState);
                global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
                FirebaseApp.InitializeApp(this);
                LoadApplication(new App());
            }
            catch (Exception EX)
            {
            }
        }
Exemplo n.º 14
0
        public override void OnCreate()
        {
            base.OnCreate();

            CrossFirebasePushNotification.Current.OnTokenRefresh += (s, p) =>
            {
            };

            var options = new FirebaseOptions.Builder()
                          .SetApplicationId("1:631962306174:android:bee68b9aaa965ed726ba2f")
                          .SetApiKey("AIzaSyDkCDZzVNNUuNBuLI5Dk7tKRTRH7u30TIo").Build();
            //.SetDatabaseUrl("https://litlew.firebaseio.com")
            //.SetStorageBucket("litlew.appspot.com")
            //.SetGcmSenderId("631962306174-jg3p2gfpdgto3e8f4ih707rnistpjfr3.apps.googleusercontent.com").Build();
            var fapp = FirebaseApp.InitializeApp(this, options);


            //FirebaseOptions.

            //FirebaseApp.InitializeApp(this);

            //Set the default notification channel for your app when running Android Oreo
            if (Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.O)
            {
                //Change for your default notification channel id here
                FirebasePushNotificationManager.DefaultNotificationChannelId = "FirebasePushNotificationChannel";

                //Change for your default notification channel name here
                FirebasePushNotificationManager.DefaultNotificationChannelName = "General";
            }


            //If debug you should reset the token each time.
#if DEBUG
            FirebasePushNotificationManager.Initialize(this, true);
#else
            FirebasePushNotificationManager.Initialize(this, false);
#endif

            //Handle notification when app is closed here
            CrossFirebasePushNotification.Current.OnNotificationReceived += (s, p) =>
            {
            };
        }
Exemplo n.º 15
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            try
            {
                base.OnCreate(bundle);

                //Push Notification
                OneSignal.Current.StartInit("6967aeda-2235-4059-bfe2-e70281ebc90b")
                .EndInit();

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

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

                FirebaseOptions options = new FirebaseOptions.Builder()
                                          .SetApplicationId("br.com.maxima.tracking")
                                          .SetDatabaseUrl("https://mxm-tracking.firebaseio.com")
                                          .SetGcmSenderId("757192689047")
                                          .Build();

                var apps = Firebase.FirebaseApp.GetApps(this);
                if (apps.Count == 0)
                {
                    FirebaseApp.InitializeApp(this, options);
                }


                //Firebase.FirebaseApp.InitializeApp(this);
                //Firebase.Iid.FirebaseInstanceId.GetInstance(Firebase.FirebaseApp.InitializeApp(this));


                LoadApplication(new App(true, "maxima"));
            }
            catch (System.Exception)
            {
                Firebase.FirebaseApp.InitializeApp(this);
                Firebase.Iid.FirebaseInstanceId.GetInstance(Firebase.FirebaseApp.InitializeApp(this));

                LoadApplication(new App(true, "maxima"));
            }
        }
Exemplo n.º 16
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);
            CurrentActivityRef = this;
            var builder = new FirebaseOptions.Builder();

            builder.SetApiKey("AIzaSyAaDvgA60S659P6DDZoAXx_HxEnQGwHw-8");
            builder.SetProjectId("task-manager-99e87");
            builder.SetStorageBucket("task-manager-99e87.appspot.com");
            builder.SetApplicationId("1:358089600915:android:01c3cfbae105ed8331c266");
            var options = builder.Build();

            FirebaseApp.InitializeApp(this, options);
            LoadApplication(new App(new Setup()));
        }
Exemplo n.º 17
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);

            //Options for firebase authentication
            FirebaseOptions options = new FirebaseOptions.Builder()
                                      .SetApiKey("AIzaSyAqk5UYOpQBZErOsXqWROajo1qkx_uQV0c")
                                      .SetApplicationId("1:81747878099:android:b59e30d886e4323f")
                                      .Build();
            FirebaseApp  app          = FirebaseApp.InitializeApp(this, options);
            FirebaseAuth authInstance = FirebaseAuth.GetInstance(app);

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

            try
            {
                base.OnCreate(bundle);

                //Push Notification
                OneSignal.Current.StartInit("24940caf-597e-4150-930d-be68b9244e7b")
                .EndInit();

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

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


                FirebaseOptions options = new FirebaseOptions.Builder()
                                          .SetApplicationId("br.com.alltechseguranca.tracking")
                                          .SetDatabaseUrl("https://alltech-tracking.firebaseio.com")
                                          .SetGcmSenderId("509518662047")
                                          .Build();

                var apps = Firebase.FirebaseApp.GetApps(this);
                if (apps.Count == 0)
                {
                    FirebaseApp.InitializeApp(this, options);
                }


                Firebase.FirebaseApp.InitializeApp(this);
                Firebase.Iid.FirebaseInstanceId.GetInstance(Firebase.FirebaseApp.InitializeApp(this));



                LoadApplication(new App(true, "alltech"));
            }
            catch (System.Exception)
            {
                LoadApplication(new App(true, "alltech"));
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.uploadNoteLecture);
            var toolbarup = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbaruploadnote);

            SetSupportActionBar(toolbarup);
            MaterialMenuDrawable materialMenu = new MaterialMenuDrawable(this, Color.Purple, (int)stroke.EXTRA_THIN, MaterialMenuDrawable.DefaultScale, MaterialMenuDrawable.DefaultTransformDuration);

            materialMenu.SetIconState(MaterialMenuDrawable.IconState.Arrow);
            toolbarup.NavigationIcon   = materialMenu;
            toolbarup.NavigationClick += delegate {
                OnBackPressed();
            };
            NoteCourse_name = FindViewById <TextView>(Resource.Id.UploadNoteCourse);
            Notedone_btn    = FindViewById <TextView>(Resource.Id.UploadNoteDone);
            uploadnoteName  = FindViewById <TextView>(Resource.Id.uploadNoteName);
            uploadnotePath  = FindViewById <TextView>(Resource.Id.uploadNotePath);
            uploadnoteSize  = FindViewById <TextView>(Resource.Id.uploadNoteSize);
            uploadNoteTitle = FindViewById <TextView>(Resource.Id.uploadNoteLectureTitle);
            Noteadd_new     = FindViewById <FloatingActionButton>(Resource.Id.UploadNotesFab);
            NoteinfoHolder  = FindViewById <LinearLayout>(Resource.Id.UploadInfoNotesHolder);
            Noteitemholder  = FindViewById <LinearLayout>(Resource.Id.uploaditemNoteholder);

            FirebaseApp.InitializeApp(this);
            storage    = FirebaseStorage.Instance;
            Storageref = storage.GetReferenceFromUrl("gs://flippedcu.appspot.com").Child("Lectures");


            Vidname              = Intent.GetStringExtra("lectureVidName") ?? "";
            Vidpath              = Intent.GetStringExtra("lectureVidPath") ?? "";
            Vidsize              = Intent.GetStringExtra("lectureVidSize") ?? "";
            LecTitle             = Intent.GetStringExtra("lectureTitle") ?? "";
            course               = Intent.GetStringExtra("course") ?? "";
            NoteCourse_name.Text = course;
            uploadNoteTitle.Text = LecTitle;

            Notedone_btn.SetOnClickListener(this);
            Noteadd_new.SetOnClickListener(this);


            // Create your application here
        }
Exemplo n.º 20
0
        private static FirebaseApp InitFireApp()
        {
            var app = FirebaseApp.InitializeApp(Application.Context);

            if (app == null)
            {
                var options = new FirebaseOptions.Builder()
                              .SetProjectId("oyadieyie3d")
                              .SetApplicationId("oyadieyie3d")
                              .SetApiKey("AIzaSyD_uotb9-fNmlfII93imcZFNM-oALIisHw")
                              .SetDatabaseUrl("https://oyadieyie3d.firebaseio.com")
                              .SetStorageBucket("oyadieyie3d.appspot.com")
                              .Build();

                app = FirebaseApp.InitializeApp(Application.Context, options);
            }

            return(app);
        }
Exemplo n.º 21
0
        protected override void OnCreate(Bundle bundle)
        {
            FirebaseApp.InitializeApp(this);
            CrossCloudFirestore.Current.Instance.FirestoreSettings = new FirestoreSettings
            {
                AreTimestampsInSnapshotsEnabled = true,
            };

            Helper.Assets = Assets;

            // tests can be inside the main assembly
            AddTestAssembly(Assembly.GetExecutingAssembly());
            AddExecutionAssembly(typeof(ExtensibilityPointFactory).Assembly);
            // or in any reference assemblies
            // AddTest (typeof (Your.Library.TestClass).Assembly);

            // Once you called base.OnCreate(), you cannot add more assemblies.
            base.OnCreate(bundle);
        }
Exemplo n.º 22
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            //Xamarin.Forms.DependencyService.Register<IAuth>();

            FirebaseApp.InitializeApp(Application.Context);

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

            Shiny.AndroidShinyHost.Init(Application, new MyStartup());

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App());
        }
Exemplo n.º 23
0
        private void InitializeFirebaseAuthentication()
        {
#if DEBUG
            var options = new FirebaseOptions.Builder()
                          .SetApplicationId("1:59954122652:android:09a3c126e798bd59")
                          .SetApiKey("AIzaSyDQQ6QWx4luoEbDMkjS-l5Mn9-rZ7HZg0A")
                          .Build();
#else
            var options = new FirebaseOptions.Builder()
                          .SetApplicationId("1:711636366543:android:09a3c126e798bd59")
                          .SetApiKey("AIzaSyDMjWYUtEAsGvQs0bMpmYQnyYraYrk_zyk")
                          .Build();
#endif

            if (FirebaseApp == null)
            {
                FirebaseApp = FirebaseApp.InitializeApp(this, options, "FirebaseSample");
            }
        }
Exemplo n.º 24
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            // Create your application here
            SetContentView(Resource.Layout.activity_login_signup);
            FirebaseApp app = FirebaseApp.InitializeApp(Android.App.Application.Context);

            if (savedInstanceState == null)
            {
                LoginFragment login = new LoginFragment();
                login.BtnSignUpClickEventHandler += Login_BtnSignUpClickEventHandler;
                login.BtnResetClickEventHandler  += Reset_BtnResetClickEventHandler;
                login.SuccessEventHandler        += Login_SuccessEventHandler;
                SupportFragmentManager.BeginTransaction()
                .SetCustomAnimations(Resource.Animation.Pushup_in, Resource.Animation.Pushup_out)
                .Add(Resource.Id.loginFragmentHost, login)
                .Commit();
            }
        }
Exemplo n.º 25
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Splash);
            ISharedPreferences sharedPreferences = PreferenceManager.GetDefaultSharedPreferences(Application.Context);

            //XF.Material.Droid.Material.Init(this, savedInstanceState);
            //Xamarin.Forms.FormsMaterial.Init(this, savedInstanceState);

            Crashlytics.Crashlytics.HandleManagedExceptions();

            AppCenter.Start("4b376e42-98b2-47fd-af73-7a84453954f9", typeof(Analytics), typeof(Crashes));

            App          = FirebaseApp.Instance ?? FirebaseApp.InitializeApp(ApplicationContext);
            FirebaseAuth = FirebaseAuth.GetInstance(App);
            FirebaseAnalytics.GetInstance(this);
            //FirebaseDynamicLinks.Instance.GetDynamicLink(Intent).AddOnSuccessListener(this);

            bool firstRun = sharedPreferences.Contains(FIRST_RUN);

            if (Intent.HasExtra("intent_activity") && Intent.GetStringExtra("intent_activity").Equals("LoginActivity"))
            {
                SplashInit();
                DoSplashSwipe(SwipeDirection.Forward);
                DoSplashSwipe(SwipeDirection.Forward);
            }
            else if (FirebaseAuth.CurrentUser != null && firstRun)
            {
                StartActivity(new Intent(this, typeof(MainActivity)));
                Finish();
            }
            else if (!firstRun)
            {
                sharedPreferences.Edit().PutBoolean(FIRST_RUN, false).Apply();
                SplashInit();
            }
            else if (firstRun)
            {
                StartActivity(new Intent(this, typeof(LoginActivity)));
            }
        }
Exemplo n.º 26
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            //First try
            //FirebaseApp.InitializeApp(Application.Context);

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

            //Second try
            var options = new FirebaseOptions.Builder()
                          .SetApplicationId("1:255062236816:ios:515091219a2aac8036c215")
                          .SetApiKey("AIzaSyBZoZj4s_62DIUc7oVhaZ6i4knXIPVNrKM")
                          .SetDatabaseUrl("https://.firebaseio.com")
                          .SetStorageBucket("fitactive-2021.appspot.com").Build();
            var fapp = FirebaseApp.InitializeApp(this, options);

            LoadApplication(new App());
        }
Exemplo n.º 27
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            FirebaseApp.InitializeApp(Android.App.Application.Context);


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

            base.OnCreate(savedInstanceState);


            global::Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental", "SwipeView_Experimental");
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            global::Xamarin.Forms.DependencyService.RegisterSingleton <IHolidayService>(new HolidayService());
            global::Xamarin.Forms.DependencyService.RegisterSingleton <IOrderHistoryService>(new OrderHistoryService());
            global::Xamarin.Forms.DependencyService.RegisterSingleton <IShoppingCartService>(new ShoppingCartService());
            global::Xamarin.Forms.DependencyService.RegisterSingleton <IOrderCalendarService>(new OrderCalendarService());
            LoadApplication(new App());
        }
Exemplo n.º 28
0
        /// <inheritdoc/>
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            _loggerSink = new AppLoggerSink();
            Platform.Init(this, savedInstanceState);
            Xamarin.Forms.Forms.Init(this, savedInstanceState);

            // Initialise the Firebase application
            FirebaseApp.InitializeApp(this);
            var callbacks = new PushCallbacks()
            {
                ActivatedCallback              = error => LogCallback("Activated", error),
                DeactivatedCallback            = error => LogCallback("Deactivated", error),
                SyncRegistrationFailedCallback = error => LogCallback("SyncRegistrationFailed", error)
            };
            var realtime = Configure(callbacks);

            LoadApplication(new App(realtime, _loggerSink, Receiver));
        }
Exemplo n.º 29
0
        void InitDatabase()
        {
            var app = FirebaseApp.InitializeApp(this);

            if (app == null)
            {
                var options = new FirebaseOptions.Builder()
                              .SetApplicationId("ethouberapp")
                              .SetApiKey("AIzaSyBazRVFLI9bdr0IMJAaN2kHS0UROuN0tb8")
                              .SetDatabaseUrl("https://ethouberapp.firebaseio.com")
                              .SetStorageBucket("ethouberapp.appspot.com")
                              .Build();
                app    = FirebaseApp.InitializeApp(this, options);
                dbAuth = FirebaseAuth.Instance;
            }
            else
            {
                dbAuth = FirebaseAuth.Instance;
            }
        }
Exemplo n.º 30
0
        public void initFireBaseAuth()
        {
            var options = new Firebase.FirebaseOptions.Builder()
                          .SetApplicationId("1:323956276016:android:fcf09b75b366f4fa50a6f5")
                          .SetApiKey("AIzaSyAOvDOj-PKpxFZcDgMO7uI4rxrP3i2GakM")
                          .SetDatabaseUrl("https://easymessage-1fa08.firebaseio.com/")
                          .Build();

            if (app == null)
            {
                app = FirebaseApp.InitializeApp(Application.Context, options);
            }

            auth = FirebaseAuth.GetInstance(app);

            if (auth == null)
            {
                throw new Exception("Authentication Error!");
            }
        }