从Google Play服务获取用户ID?
答
对于Google Play游戏服务,您可以使用:
String playerId = Games.Players.getCurrentPlayerId(getApiClient());
答
这取决于您尝试访问的服务。 下面是相关类Player
对谷歌玩游戏: https://developer.android.com/reference/com/google/android/gms/games/Player.html
及相关类People
从谷歌加: https://developer.android.com/reference/com/google/android/gms/plus/model/people/package-summary.html
最后,还有AdvertisingIdClient
对于谷歌移动广告平台: https://developer.android.com/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.html
我明白了,但谢谢。这可能对未来的其他人有所帮助。 – Agamemnus 2015-01-12 20:40:57
@Pygmalion它是独一无二的,并且是不变的?它可以用来在线保存玩家的进度吗? – 2016-05-20 16:56:58