如何解决将 Google Play 游戏服务添加到现有应用
我们已经在 App All apps 列表下发布了一个应用/游戏作为普通应用,现在我们想添加 Play 游戏服务登录,让用户保存游戏进度。
阅读文档后,我们了解到我们需要在应用程序下设置 Play Game Services
,我们需要在其中添加凭据并发布游戏。所以我们关心的是它会在 Playstore 上创建一个新应用还是只在 Google Games 中发布?
在已发布的现有应用中添加 Play 游戏登录的正确方法是什么?
解决方法
见Setting Up Google Play Games Services。
在第 2 步选择:“是的,我的游戏已经使用了 Google API”。
它需要这些依赖:
implementation "com.google.android.gms:play-services-base:17.6.0"
implementation "com.google.android.gms:play-services-auth:19.0.0"
implementation "com.google.android.gms:play-services-games:21.0.0"
以及 res/values/ids.xml
(来自 Google Play 管理中心)和 AndroidManifest.xml
已编辑:
<application
...>
<meta-data
android:name="com.google.android.gms.games.APP_ID"
android:value="@string/app_id" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
...
</application>
它还解释了here。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。