1

I want my users to login using Google Play Game Services to play my game. And I did it by this guide: https://developers.google.com/games/services/android/init . Everything is ok.

There is only 1 small "problem". If users have many mail on their phone, first mail will be selected by default when they login. Sign-in flow will be like this:

[Open App] --> [Dialog with Denied/Allow button (with first mail)] --> if we choose DENIED, [Mail chooser dialog] will be shown.

Question 1 is: is that default behavior of Google Play Game Services?

What I want in sign-in flow is:

[Open App] --> [Mail chooser dialog] --> [Dialog with Denied/Allow button (with selected mail)]

Question 2 is: can I do that and how?

ReyAnthonyRenacia
  • 17,219
  • 5
  • 37
  • 56

1 Answers1

0

You'll need to call the AccountPicker for you to be able to select accounts. You'll then use the result from the onActivityResult method to get the email and set it on the GoogleApiClientBuilder.setAccountName.

You can check this question for more information about it.

Happy coding!

Community
  • 1
  • 1
adjuremods
  • 2,938
  • 2
  • 12
  • 17
  • before i ask this question, i already tried solution in that topic, but AccountPicker is not the default mail chooser in Google play game services. Its not like first picture in that topic. Its just a black and simple dialog, with a radio button next by email address. thank you anyway for your reply – Trung Nguyễn Thành Sep 13 '16 at 15:15