AndroidTestApp.MainActivity.OnCreate C# (CSharp) Method

OnCreate() protected method

protected OnCreate ( Bundle bundle ) : void
bundle Bundle
return void
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            Button acquireTokenInteractiveButton = FindViewById<Button>(Resource.Id.acquireTokenInteractiveButton);
            acquireTokenInteractiveButton.Click += acquireTokenInteractiveButton_Click;

            Button acquireTokenSilentButton = FindViewById<Button>(Resource.Id.acquireTokenSilentButton);
            acquireTokenSilentButton.Click += acquireTokenSilentButton_Click;

            Button clearCacheButton = FindViewById<Button>(Resource.Id.clearCacheButton);
            clearCacheButton.Click += clearCacheButton_Click;

            this.accessTokenTextView = FindViewById<TextView>(Resource.Id.accessTokenTextView);

            sts.Authority = "https://login.microsoftonline.com/common";
            sts.ValidClientId = "b92e0ba5-f86e-4411-8e18-6b5f928d968a";
            sts.ValidScope = new [] { "https://msdevex-my.sharepoint.com"};
            sts.ValidUserName = "[email protected]";

            EditText email = FindViewById<EditText>(Resource.Id.email);
            email.Text = sts.ValidUserName;
        }