Questions tagged [accountpicker]

Common account picker similar to the standard framework account picker introduced in ICS.

Documentation: http://developer.android.com/reference/com/google/android/gms/common/AccountPicker.html

Returns an intent to an Activity that prompts the user to choose from a list of accounts. The caller will then typically start the activity by calling startActivityForResult(intent, ...);.

On success the activity returns a Bundle with the account name and type specified using keys KEY_ACCOUNT_NAME and KEY_ACCOUNT_TYPE.

20 questions
25
votes
3 answers

Pick an email using AccountPicker.newChooseAccountIntent

I'm trying to let the user pick an Email account using the following code: Intent intent = AccountPicker.newChooseAccountIntent(null, null, new String[]{"com.google"}, false, null, null, null, null); …
Udi Oshi
  • 6,787
  • 7
  • 47
  • 65
12
votes
1 answer

Authorize user on Google website in WebView via dialog

For example, user is navigating to google.com in WebView. Is it possible to authorize him there via Google Account Picker (something like described here https://developers.google.com/android/guides/http-auth) to simplify authorization instead of…
artem
  • 16,382
  • 34
  • 113
  • 189
7
votes
3 answers

Android espresso and account picker

I am having trouble making the instrumentation test using the Espresso. I have an activity where account picker is popup-ed when app is started (main activity). If customer clicks on cancel (in dialog), picker is popup up again; If user clicks on…
DI_one
  • 71
  • 1
  • 3
5
votes
2 answers

AccountPicker.newChooseAccountIntent does not display picker if there are no accounts

I am trying to make the users choose from a list of custom accounts of the same type using an AccountPicker. Intent pickAccountIntent = AccountPicker.newChooseAccountIntent(null, null, new String[]{"com.home.customapp"}, true, null, null, null,…
Alex Deac
  • 69
  • 1
  • 3
4
votes
1 answer

Android - struggling to style Account Picker

I'm trying to implement an AccountPicker in my game, and I've tried using all three versions of newChooseAccountIntent, 2 coming from AccountManager and one from AccountPicker. my code looks like this if (android.os.Build.VERSION.SDK_INT >=…
Russ Wheeler
  • 2,590
  • 5
  • 30
  • 57
3
votes
2 answers

Custom title for AccountPicker

The newChooseAccountIntent() method from the AccountPicker allows you to customise the text in the AccountPicker "dialog" (actually an Activity) by way of the descriptionOverrideText argument: public static Intent newChooseAccountIntent (Account…
drmrbrewer
  • 11,491
  • 21
  • 85
  • 181
3
votes
0 answers

Why can't I import the "common" part of Play Services com.google.android.gms.common.AccountPicker

I am trying to import Google Play Services in order to use the AccountPicker. I followed the instructions, installed everything: I also imported Play Services in my build.gradle file: But the result is that I can definitely import…
Waza_Be
  • 39,407
  • 49
  • 186
  • 260
3
votes
1 answer

android-get nullpointerexception when try to access video on external storage(sdcard)

In my app, I have a video upload option which allows user to upload the video. everything works fine except when user tried to pick a video from external storage. the app will just crash and give NullPointerException. Can someone please explain why?…
user1865027
  • 3,505
  • 6
  • 33
  • 71
3
votes
3 answers

Why is Account Picker in Android application getting canceled?

Following the "Five minute quick start" documentation for uploading a file from an Android device to Google Drive, I've written a test application that successfully uploads a file but my attempt at copying the relevant code to a larger application…
gregS
  • 2,580
  • 5
  • 28
  • 33
2
votes
0 answers

How do you get the First Name, Last Name and Gender from Google Play Services AccountPicker (Android Studio)?

I'm using google play services AccountPicker. My app doesn't require user to login but I added permission to get the account details in the manifest. I would like to know the First Name, Last Name, email and gender of the user for push notifications…
2
votes
1 answer

Prevent dialog from showing in EditTextPreference onClick

I want to show the system dialog from which the user can pick his google account, and I want it to show when the user click in an EditTextPreference. The problem is that the "normal" dialog keep showing before the system default one. Here is the…
ParKein
  • 133
  • 1
  • 12
1
vote
0 answers

How to add custom dialog for AccountPicker in android?

below is my code to get email accounts of device and I want to use custom dialog box for google's account picker: Intent intent = AccountPicker.newChooseAccountIntent( null, null, new String[] { GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE }, …
1
vote
0 answers

How to show profile picture along with mail id in using Account Picker API in android

I am working on making a user login with with google plus in my android app. So on click of the button an account picker is shown to him which just contains a list of mail ids registered on device and an option to add new account.(This is done using…
1
vote
1 answer

How To Detect User Cancel AccountPicker dialog Android Eclipse

i want user Email id via AccountPicker.newChooseAccountIntent. i want Detect User Cancel AccountPicker dialog here is a code private static final int REQUEST_CODE_EMAIL = 1; private TextView email = (TextView) findViewById(R.id.email); …
Virat21
  • 136
  • 1
  • 10
1
vote
1 answer

Google Accounts Picker Not Showing Up

I can not for the life of me figure out why, but my google account intent isn't showing up in a popup dialog. Here is my code and I can provide more of it if needed. public class MainMenu extends ActionBarActivity implements ActionBar.TabListener…
Dean Galvin
  • 169
  • 1
  • 11
1
2