android - 有什么方法可以自定义消息 "This app won' t 运行,除非您更新 Google Play 服务”或根据用户选择跳过消息

标签 android google-cloud-messaging android-notifications

我们已经实现了 GCM (Google Cloud Messaging) 来向 App 发送通知。

如果特定设备中的 Google Play 服务不是所需的最新版本,该应用会在应用启动时显示上述消息。我们在应用程序的 SplashScreen.java Activity 中实现了相同的功能。所以它在初始屏幕顶部对用户可见几秒钟。 Splash Activity 还有一些其他工作,因此它会保持可见约 10 到 30 秒。

目前我们使用“com.google.android.gms:play-services-gcm:8.4.0”作为依赖项。

我们还尝试在函数范围内创建“GoogleCloudMessaging gcm”变量实例,如果需要,我们可以调用或跳过它。

但是如果我们跳过“GoogleCloudMessaging”变量的创建,我们仍然会在应用程序启动时找到消息。

在某些设备上,用户没有足够的空间来更新“Google Play 服务”,因此要停止每次向用户显示此消息,是否有任何方法可以在应用程序启动时跳过或更改此警告消息?

链接Handling Google Play Service Update Message可能是最近的问题,但我们仍然没有所需的答案。

提前致谢。

最佳答案

这可能也相关:How to make google play games optional?

You say that:

But if we skip the creation of "GoogleCloudMessaging" variable, still we are finding the message on start of app.

但是,您不仅应该跳过创建,还应该避免从 GooglePlayServices 导入任何内容的类

关于android - 有什么方法可以自定义消息 "This app won' t 运行,除非您更新 Google Play 服务”或根据用户选择跳过消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36840454/

相关文章:

Java List.set() 改变列表大小。为什么?

Android通过发件人姓名查询短信收件箱

java - 使用 RadioButtons 实现 TextWatcher

azure 通知中心 - 应用程序卸载

打瞌睡模式下的 Android VOIP 应用程序行为

Android Oreo 不播放自定义通知声音

android - 如何在 Android 中执行点击操作后从通知发送 Toast?

java - list 中引用的资源不能因配置而异?

android - 我在我的应用程序中使用 Google Cloud Messaging 推送通知,对此我有 2 个基本疑问

Android 显示通知不起作用