Delay android PlusClient login request
- by jamesakadamingo
I am trying to implement the new PlayServices API within my android application to use a +1 button.
I have it working nicely, all the expected functionality is there. However it has one rather annoying feature (seriously google!). When you instance the plusclient:
mPlusClient = new PlusClient(this, this, this, Scopes.PLUS_PROFILE);
Your user is presented with a "Pick your account" dialog (if they have more than one account) followed by a "grant access" dialog. I understand the need for these steps, however they really get in the way of the user experience!
My initial activity (post splash screen) now has the +1 button, which means that you have to instance the PlusClient. Doing so in the onCreate() method (as google suggests) means that my user is given the "authorisation" screen before they even know what is going on!
What I want to do it delay that untill they actually click the +1 button. That way they will know why they are being asked to authorise access to their account!
Any ideas? I have tried using an onClick listener on the +1 button to instance but it didn't work.