1

Is there any way to Prefill the email address and username from an android device similar to Google Pay Application.

As Google pay application is not taking any permissions or Google sign Options or Account pickers(that user will select one of his available accounts).

Can someone help/suggest how to get this.

Attaching a screenshot for reference.image from Google Pay app

Ram Koti
  • 2,203
  • 7
  • 26
  • 36
Ram Koti
  • 11
  • 2
  • https://stackoverflow.com/a/59373332/3995941 – Deepak Ror Feb 10 '20 at 09:17
  • Hi @Deepak, thanks for the quick response, in the above suggestion there is permission required "GET_ACCOUNTS", can we do it with out asking any permission. – Ram Koti Feb 10 '20 at 09:19
  • Does this answer your question? [How to get the Android device's primary e-mail address](https://stackoverflow.com/questions/2112965/how-to-get-the-android-devices-primary-e-mail-address) – Ajay K S Feb 10 '20 at 09:19
  • Hi @AjayKS, thanks for the quick response, in the above suggestion all the answers requests for runtime permissions like "READ_CONTACTS", "GET_ACCOUNTS", account pickers, can we do it with out asking any permission or popup to choose an account. – Ram Koti Feb 10 '20 at 09:22
  • No, You have to need permission. if you are looking at google, Google have phone root permission SO they don't need any Account permission (except other) – Deepak Ror Feb 10 '20 at 09:24
  • Any hacks or work arounds to implement this? – Ram Koti Feb 10 '20 at 09:27
  • in rooted device – Deepak Ror Feb 10 '20 at 11:33
  • Both in rooted and non-rooted devices. – Ram Koti Feb 10 '20 at 12:09

1 Answers1

0

You can use AccountPicker.

Take a look at this.

Ali
  • 87
  • 8