account-kit-samples-for-android
account-kit-samples-for-android copied to clipboard
how to get input phone number in custom ui
@zhjing03 Can you elaborate a little more? What are you trying to accomplish and what problem are you running into?
I use configurationBuilder.setUIManager(uiManager) and override getHeaderFragment to custom ui. I want to get EditText’s input text(phone num) on my own fragment(input phone num page) .How can I do?
在 2017年8月18日,上午1:59,John Anderson [email protected] 写道:
@zhjing03 https://github.com/zhjing03 Can you elaborate a little more? What are you trying to accomplish and what problem are you running into?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fbsamples/account-kit-samples-for-android/issues/12#issuecomment-323148573, or mute the thread https://github.com/notifications/unsubscribe-auth/AP2jM_DEt60yosMAZv_7jEpqTMYUJSoUks5sZH-agaJpZM4O54-j.
use Response type TOKEN AccountKitConfiguration.AccountKitConfigurationBuilder configurationBuilder = new AccountKitConfiguration.AccountKitConfigurationBuilder( LoginType.PHONE, AccountKitActivity.ResponseType.TOKEN);
and get the phone number from the success block using following code
AccountKit.getCurrentAccount(new AccountKitCallback<Account>() { @Override public void onSuccess(final Account account) { // Get Account Kit ID // String accountKitId = account.getId();
// Get phone number
PhoneNumber phoneNumber = account.getPhoneNumber();
String phoneNumberString = phoneNumber.toString();
Log.e(TAG, "onSuccess: phoneNumberString >>> " + phoneNumberString);
// Get email
// String email = account.getEmail();
afterLoginSuccess(phoneNumberString);
}
@Override
public void onError(final AccountKitError error) {
// Handle Error
Log.e(TAG, "onError: INSIDE ERROR ");
}
});
Is this still a valid issue?