cranberrygame / cordova-plugin-game

Other
27 stars 33 forks source link

The "Choose account" dialog does not show up #18

Open amsonline opened 8 years ago

amsonline commented 8 years ago

I've installed the plugin, but when I want to use it, no "Choose account" dialog shows up. I have connected two Google accounts to my phone, and when I try to connect any other game to my Google Game account, this dialog appears.

I think your plugin needs modifications to handle it.

letmaik commented 8 years ago

This happens when the login got declined already and is typically fine on app start. But of course, once a user clicks on some button that requires Play Games, then the sign in prompt should appear. And in fact Google supports that via GameHelper.beginUserInitiatedSignIn(). I think the plugin should allow to have a parameter in the login() method like login({userInitiated: true}) which is a hint to try showing a login prompt again even if declined previously. This would not work on iOS, but since it's just a hint I think it's ok (after all it's not called "forcePrompt" or something like that).