/// <summary> /// Method to trigger the digitsauth button with country extension /// </summary> private void TriggerDigitsAuthButton() { AuthConfig.Builder authConfigBuilder = new AuthConfig.Builder() .WithAuthCallBack(this) .WithPhoneNumber("+91"); Digits.Authenticate(authConfigBuilder.Build()); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET); Fabric.With(this, new TwitterCore(authConfig), new Digits()); Button button = FindViewById <Button>(Resource.Id.MyButton); //custom Action method button.Click += delegate { Digits.Authenticate(this); }; //with Digits Authenticate Button DigitsAuthButton digitsButton = (DigitsAuthButton)FindViewById(Resource.Id.auth_button); digitsButton.Text = "Hey Authenticate Me"; digitsButton.SetCallback(this); }