Ejemplo n.º 1
0
        protected async override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);
            IInstanceIdResult result = await FirebaseInstanceId.Instance.GetInstanceId().AsAsync <IInstanceIdResult>();

            string token  = result.Token;
            string FcmKey = token.ToString();

            Preferences.Set("FcmKey", FcmKey);

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

            ZXing.Mobile.MobileBarcodeScanner.Initialize(this.Application);
            LoadApplication(new App());
        }