Google Play Game Services - not signed in on next activity

半腔热情 提交于 2019-12-04 18:46:24

There's two types of sign in:

  1. The user initiated sign in which shows the Google Play Games logo and requires the user to approve access, etc.
  2. Silent sign in (which BaseGameActivity does in its onStart call) - this automatically attempts to sign in and, if the user has already signed in, does the same callback as if you had gone through the user initiated sign in flow.

Therefore you do need to wait for the sign in callback before attempting any Google Play Games related calls in each and every activity.

Note that recently (4 days ago on Feb 18, 2014), the BaseGameUtils library for Android was updated to use the new Google Api Client model, which allows you to do read calls before being signed in (where they will automatically wait until sign in before attempting to process). As the Google Api Client gives a number of other benefits (such as improved sign in reliability), you should update to the latest BaseGameUtils if you haven't already.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!