【问题标题】:GCM push notification issue in android P (28)android P 中的 GCM 推送通知问题 (28)
【发布时间】:2018-08-22 23:29:28
【问题描述】:

我们正在使用 GCM 为我们的应用推送通知,目标版本为 26。 由于目标版本 26,因此使用 class GCMJobIntentService extends JobIntentService 推送通知服务。

现在 android P 发布,推送通知停止工作。调试时发现以下异常

ActivityManager: 无法启动服务 Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gsf (有额外内容)} U=0:未找到

由于上述异常,它返回空白 gcm 令牌并且没有任何推送工作。是否有人面临同样的问题,是否有任何解决方案可以在不更新到 FCM 的情况下使用 GCM?

【问题讨论】:

    标签: android push-notification google-cloud-messaging


    【解决方案1】:

    您可以参考这篇文章:GCM unable to start service intent。您需要升级到 GCM 11 或更高版本。

    您可能使用的是旧版本的 GCM。

    您可以升级到 GCM 11 或更高版本,甚至更好,迁移到 FCM。 (GCM 现已弃用)

    (GCM最新版本为15.0.1:com.google.android.gms:play-services-gcm:15.0.1)

    由于GCM即将被淘汰,建议您改用FCM。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-07-24
      • 2014-10-02
      • 2015-03-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多