account-kit-samples-for-android icon indicating copy to clipboard operation
account-kit-samples-for-android copied to clipboard

how to get input phone number in custom ui

Open KingHeavens opened this issue 7 years ago • 4 comments

KingHeavens avatar Aug 17 '17 07:08 KingHeavens

@zhjing03 Can you elaborate a little more? What are you trying to accomplish and what problem are you running into?

zaren678 avatar Aug 17 '17 17:08 zaren678

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.

KingHeavens avatar Aug 18 '17 07:08 KingHeavens

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 ");
        }
    });

cnaveen1403 avatar Oct 06 '17 12:10 cnaveen1403

Is this still a valid issue?

abeatte avatar Nov 14 '17 21:11 abeatte