android - 按Google Play服务版本过滤应用分发

标签 android google-play google-play-services

我的问题很简单。是否可以仅将Android应用程序服务/分发给具有Google Play服务版本x或更高版本的设备?

我检查了分发过滤器页面,但是那里没有提及Google Play服务。我抱着希望,来到了这里。

有没有人提供某些信息?

谢谢

最佳答案

我不这么认为,因为这没有多大意义。如果您的应用要求使用特定版本且用户年龄较大,则将要求他升级其Google Play服务副本,因此实际上没有必要不将应用分发给此类用户(他们可能根本不知道新版本) Google Play服务(甚至根本没有像Google Play服务这样的生物)

您的应用应调用GooglePlayServicesUtil.isGooglePlayServicesAvailable(),可以返回的返回码之一是ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED,它基本上涵盖了您所描述的情况。对于该返回码,您只能执行以下操作:

if( GooglePlayServicesUtil.isUserRecoverableError( errorCode ) ) {
    GooglePlayServicesUtil.getErrorDialog(errorCode, null, requestCode)
}

然后让utils完成其余的工作。

关于android - 按Google Play服务版本过滤应用分发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25690069/

相关文章:

android - 将 Google Play 游戏与 Firebase Auth 结合使用

安卓市场。 Google Checkout 和银行账户

安卓手势检测

android - 如何为市场签署 android 应用程序?

android - 如何复制保护 PhoneGap Android 应用程序? Android Market复制保护功能有用吗?

java - 安装com.google.android.gms :play-services:8. 4.4

android - android 中的无效文件 : google-play-services_lib/build. xml

java - 错误 : cannot access InternalTokenProvider (Firebase/GooglePlayServices)

android - .net web 服务在数据开头返回 NULL 对象

android - 将 SHA-1 API key 提取到 xml