예제 #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            mOktaAppAuth = OktaAppAuth.GetInstance(this);
            SetContentView(Resource.Layout.activity_user_info);

            if (!mOktaAppAuth.IsUserLoggedIn)
            {
                Log.Debug(Tag, "No logged in user found. Finishing session");
                displayLoading("Finishing session");
                clearData();
                Finish();
            }

            displayLoading(GetString(Resource.String.loading_restoring));

            if (savedInstanceState != null)
            {
                try
                {
                    mUserInfoJson[KeyUserInfo] = savedInstanceState.GetString(KeyUserInfo);
                }
                catch (JSONException ex)
                {
                    Log.Error(Tag, "Failed to parse saved user info JSON, discarding", ex);
                }
            }
        }
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     mOktaAppAuth = OktaAppAuth.GetInstance(this);
     SetContentView(Resource.Layout.activity_session_login);
     FindViewById(Resource.Id.start_auth).Click += (sender, args) => { startAuth(); };
     mContainer = FindViewById <LinearLayout>(Resource.Id.auth_container);
 }
예제 #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            mOktaAppAuth = OktaAppAuth.GetInstance(this);

            SetContentView(Resource.Layout.activity_login);

            FindViewById(Resource.Id.start_auth).Click += LoginActivity_Click;

            ((EditText)FindViewById(Resource.Id.login_hint_value)).AddTextChangedListener(new OktaAppAuth.LoginHintChangeHandler(mOktaAppAuth));

            mContainer = FindViewById <LinearLayout>(Resource.Id.auth_container);
        }