I am using Facebook account kit to verify user mobile number. I have used below code,
final Intent intent = new Intent(MainActivity.this, AccountKitActivity.class);
AccountKitConfiguration.AccountKitConfigurationBuilder configurationBuilder =
new AccountKitConfiguration.AccountKitConfigurationBuilder(
LoginType.PHONE,
AccountKitActivity.ResponseType.TOKEN); // or .ResponseType.TOKEN
// ... perform additional configuration ...
intent.putExtra(
AccountKitActivity.ACCOUNT_KIT_ACTIVITY_CONFIGURATION,
configurationBuilder.build());
startActivityForResult(intent, APP_REQUEST_CODE);
All is doing well. I want to pass user mobile number to AccountKit activity. Is it possible to make it work? How? Actually I want to prevent duplicate mobile verification using Account Kit, is there any other way?
You can use this
PhoneNumber phoneNumber = new PhoneNumber("+880","16XXXXXXXX","BD"); // country code, phone number, country code
final Intent intent = new Intent(context, AccountKitActivity.class);
AccountKitConfiguration.AccountKitConfigurationBuilder configurationBuilder = new AccountKitConfiguration.AccountKitConfigurationBuilder(
LoginType.PHONE,
AccountKitActivity.ResponseType.CODE);
configurationBuilder.setReadPhoneStateEnabled(true)
.setReceiveSMS(true);
intent.putExtra(
AccountKitActivity.ACCOUNT_KIT_ACTIVITY_CONFIGURATION,
configurationBuilder
.setInitialPhoneNumber(phoneNumber)
.build());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With