上下文:
- meteor
1.8.0.1
- Cordova
6.4.0
(包含在 Meteor 中) - phonegap-plugin-push
1.11.1
(支持 GCM 的最新版本) - 通过 Amazon SNS -> GCM 推送通知
问题:
最近,由于 Google Play 商店的新限制,我们不得不将 targetSdkVersion
从 25
更新到 26
。
自从我们这样做后,我们的推送通知就不再适用于 Android 8
及更高版本的设备。
注册设备工作正常,但它不会收到任何通知。
使用以下设备测试:
- Samsung Galaxy S9+ Android
8
-> 不工作 - Sony Xperia XZ Premium Android
9
-> 不工作 - Google Nexus 7 (2013) Android
6.0.1
-> 运行良好
注意事项:
我尝试在 firebase 测试项目中使用更新版本的 phonegap-plugin-push(2.1.3
最后一个支持 Cordova 6.4.0
),我从中获得了 google-service.json
,因此我可以使用 fcm,但这甚至导致应用程序崩溃。
最佳答案
看看这个 post .从 Android 8 开始,所有通知都必须有通知 channel 。
关于android - meteor 应用程序 : Push notifications stopped working for Android 8+ when updating TargetSDK to 26,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54930244/