简体   繁体   English

Cordova Ionic App - 推送通知不适用于 Android 12 和 Android 13 - cordova-android 11.0

[英]Cordova Ionic App - Push Notifications not working on Android 12 & Android 13 - cordova-android 11.0

I have an Ionic App using Cordova & Angular.我有一个使用 Cordova 和 Angular 的 Ionic 应用程序。

My push notifications are and were working fine for all iOS users and Android version <= 11 users.我的推送通知对于所有 iOS 用户和 Android 版本 <= 11 用户都可以正常工作。

We started getting a lot of reports that people weren't getting push notifications.我们开始收到很多报告,称人们没有收到推送通知。 I bought an Android phone running Android 11 to test it and it was working fine for me until I upgraded to Android 12. Now I do not receive push notifications anymore.我买了一部运行 Android 11 的 Android 手机来测试它,它对我来说工作正常,直到我升级到 Android 12。现在我不再收到推送通知了。

I tried upgrading my cordova-android to 11.0, I've tried upgrading Ionic from 5 to 6, I've upgraded all my other plugins and nothing seems to work.我尝试将我的 cordova-android 升级到 11.0,我尝试将 Ionic 从 5 升级到 6,我已经升级了所有其他插件,但似乎没有任何效果。

There's no error messages in the console when I inspect it via Chrome Everything seems to be working per norm.当我通过 Chrome 检查它时,控制台中没有错误消息一切似乎都在正常工作。

I send my push notifications via Firebase.我通过 Firebase 发送推送通知。

If you have any ideas what to try next it will be greatly appreciated!如果您有任何想法接下来要尝试什么,我们将不胜感激!

It looks like notifications are not working with @havesource/cordova-plugin-push.看起来通知不适用于@havesource/cordova-plugin-push。

I was able to resolve the issue by installing the dev version 4.0.0.dev.0我能够通过安装开发版本 4.0.0.dev.0 来解决问题

cordova plugin add @havesource/cordova-plugin-push@dev

As shown in this comment: https://github.com/havesource/cordova-plugin-push/pull/185#issuecomment-1290450721如这条评论所示: https://github.com/havesource/cordova-plugin-push/pull/185#issuecomment-1290450721

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM