Example #1
0
        /// <summary>
        /// Steps required in the creation of the mobile app.
        /// </summary>
        /// <param name="savedInstanceState"></param>
        protected override async void OnCreate(Bundle savedInstanceState)
        {
            AppCenter.Start("INSERT_APP_CENTER_API_KEY",
                            typeof(Analytics), typeof(Crashes));

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

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

            LoadApplication(new App());
            PhoneRinging = false;


            this.notificationManager = (NotificationManager)GetSystemService(Context.NotificationService);
            audioManager             = (Android.Media.AudioManager)GetSystemService(Context.AudioService);
            actionHandler            = new ActionHandler(
                new AudioManager(audioManager),
                new CallManager(),
                new GPSManager(),
                new NotificationManagerWrapper(notificationManager),
                new SmsManagerWrapper(SmsManager.Default));
            StartListening();


            IOktaStateManager state = await OktaContext.Current.SignInAsync();
        }
Example #2
0
 private async void OnLoginClicked(object sender, EventArgs e)
 {
     IOktaStateManager state = await OktaContext.Current.SignInAsync();
 }