-
-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Push notifications never arriving to the device #441
Comments
Try building and running the example project to eliminate possible problems in your codebase and use its built-in FCM v1 API messaging client to rule out any issues on your server-side. Since you are testing on a Xiaomi device, bear in mind that there is an issue which will cause notifications not to be received if the app is not running - see #235. This plugin is in use in production in numerous apps (including my own) and therefore the issue is specific to you rather than a generic issue affecting all plugin users and for that reason I'm closing this as it's a support issue not a plugin bug. |
Pushes don't work in Xiaomi devices? How's that? This was working for me just a couple of months ago, so that cannot be the problem. I re-organised the project, so I updated plugins just like yours, and that's what actually led me to this problem. Does installing the AutoStarter plugin you mention in #235 currently work for fixing the Xiaomi problem that you mention? Thank you. |
The issue with OEMs like Xiaomi is they automatically blacklist apps from autostarting, preventing them from being launched when a push notification is received when the app is not running - it works OK if the app is running in foreground or background.
It is supposed to resolve the above issue though I don't have such a device to test on so I haven't tried it to confirm this is the case. |
I was just making some testings and the pushes are not being received even if the app is in background/foreground, so I guess that my problem's root is not in this issue.
So I guess this plugin is still not embedded in your FirebaseX plugin? edit: weirdly enough, when push notifs were working well in my app, they worked even with the app totally closed (not being in background). With the same device. |
No but if someone with an affected device is able to make and test a PR containing it, I will merge it. |
hello @dpa99c. On my device xiaomi is not working when the app is closed. On my samsung everything works correctly. I am available to test possible new releases to fix this problem. Thanks |
Current behavior:
When I send pushes from my custom Firebase push server, they never arrive to the device. This server used to work in the past, with this same plugin. It acts as a scheduler that reacts upon some live queries, and sends the push at some specific time. Although the logs of the server show that it's actually sending the push with no trouble whatsoever (with the firebase-admin lib), it does not arrive into my device.
The reason is simple: server's code hasn't changed, and it used to work perfectly. The whole part that seems to be problematic, is in the client.
Expected behavior:
Push notifications should be correctly arriving.
Steps to reproduce:
Environment information
Cordova CLI version
cordova -v
Cordova platform version
9.0.0 ([email protected])
Plugins & versions installed in project (including this plugin)
cordova-plugin-androidx 2.0.0 "cordova-plugin-androidx"
cordova-plugin-androidx-adapter 1.1.1 "cordova-plugin-androidx-adapter"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-firebasex 9.1.2-cli "Google Firebase Plugin"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
Dev machine OS and version, e.g.
Windows 10 v.1903, SO 18362.900
Runtime issue
Android build issue:
14.1
d----- 25/06/2020 13:57 4.10.3 d----- 25/06/2020 13:57 4.6 d----- 25/06/2020 13:57 buildOutputCleanup d----- 25/06/2020 13:57 vcs-1
android:targetSdkVersion
inAndroidManifest.xml
--> I can't find this, no idea why. May this be a problem?
sdkmanager --list | sed -e '/Available Packages/q'
--> doesn't work either, although I can build the app and it works good (except for FCM pushes).
Related code:
My intuition keeps telling I'm doing something wrong somewhere in my ecosystem, but it doesn't make much sense that I don't get any kind of error and this thing keeps not working. The package name is correct, the plugins seem to build well, and even the Gradle Build gets the google-services.json file and puts it into the APK — which makes me think that the plugin is correctly gathering all its needed info and files to work.
Being it this way... why doesn't it work? I've been struggling with this problem for weeks, and this is starting to become a very serious problem I can't find ANY solution to. I tried literally every StackOverFlow solution, and none of them work.
This is a desperate call for help. I will appreciate a lot every effort to fix this.
Thank you.
The text was updated successfully, but these errors were encountered: