【发布时间】:2016-06-10 01:43:29
【问题描述】:
我对 android 开发很陌生。我最近学习使用 Firebase 云消息。我之前测试过它有效。现在它不工作了。我想知道这是否是 FCM 不起作用的原因。
上个月,我发布了我的应用程序,依赖于
compile 'com.google.firebase:firebase-messaging:9.0.0'
我在多台设备上测试过,firebase 控制台可以成功地向所有设备发送通知。
一周前,我注意到有 9.0.2 版本,但我还没有发布带有这个新依赖项的应用程序。是不是每次google推出新版本的firebase-messaging,都会让所有运行旧依赖的设备都收不到通知?
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.google.firebase:firebase-messaging:9.0.0'
}
apply plugin: 'com.google.gms.google-services'
【问题讨论】:
-
应该将当前代码添加到问题中。
-
不工作,你的意思是设备没有收到任何通知吗?您在发送通知时是否从服务器收到任何错误?
-
没有设备收到通知
-
新版本的消息库不应导致旧版本停止工作。 9.0.0 应该仍能按预期工作。你是如何确认设备没有收到的?另请附上您用于发送通知的请求以及您收到的回复。
-
你解决了吗?
标签: android firebase google-cloud-messaging firebase-cloud-messaging