如何使谷歌玩游戏可选? [英] How to make google play games optional?

查看:135
本文介绍了如何使谷歌玩游戏可选?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Google Play游戏与我的Android游戏整合在一起。在启动期间,如果用户没有Google Play游戏,则会显示一个对话框:

I am integrating Google Play Games with my Android game. During startup, if a user doesn't have Google Play Games, it shows a dialog with:


此应用程序需要Google的最新版本玩游戏。

This app requires the latest version of Google play games.

有没有办法让它成为可选的?我希望用户看到一个对话框,他们可以选择安装它。但它不应该明确地说需要,因为它不是。

Is there a way to make it optional? I would like users to see a dialog where they have the option to install it. But it shouldn't explicitly say required, since it isn't.

推荐答案

我整合了一张支票来测试Google Play服务是否已安装,并且只有在用户可以使用时才启动该服务( https://stackoverflow.com/a/19955415/5437864 )。

I integrated a check to test whether or not Google Play Services is installed and only start the service if it is available for the user (https://stackoverflow.com/a/19955415/5437864).

旧版本的用户,如2.3,没有Play服务,仍然可以使用应用程序,并不会得到通知。否则,他们会收到通知安装Google Play游戏。但如果他们按取消,游戏仍然会继续,没有它。

Users with older versions, like 2.3, without Play Services, can still use the app and will not get notified. Otherwise, they will be notified to install Google Play Games. But if they press cancel, the game still continues without it.

这篇关于如何使谷歌玩游戏可选?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆