question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No notifications are shown on Android 8 devices

See original GitHub issue

Hi!

I have been able to send notifications to android users in the past, using an older version of this package and cordova:phonegap-plugin-push. However, I wasn’t able to send to Android 8 devices. I was using GCM, and decided to switch to FCM.

I therefor updated to the newest version of plugin-push (allowed by the cordova-android version in meteor):

  • phonegap-plugin-push@2.1.3
  • raix:push@3.3.0

When I now send notifications, all iOS devices receive their messages correctly, but none are sent to android devices:

Push: Sent message "hello" to 1 ios apps 0 android apps

I didn’t change my configuration files, but I added google-services.json in cordova-build-override/platforms/android in order to configure FCM. I also added build-extra.gradle following the suggestion of this comment: https://github.com/meteor/meteor/issues/7600#issuecomment-368101400

I’m using the new Cloud Messaging API keys from https://console.firebase.google.com/u/0/project/pentu-ad4be/settings/cloudmessaging.

In google-services.json a different API key is used then what is added to settings (I suppose this being a generic API key voor Firebase services). (I tried changing configuration to use the same Key as well).

Even for different combinations of the same user having multiple registered devices (both iOS and Android, only Android 7, only Android 8, both android 7 and 8, …), none of the android devices are receiving messages. Users that were receiving messages with the older versions and GCM, no longer receive messages (with the same device registration data in their user profile).

I suppose something is going wrong server-side, when sending requests to firebase services, (because the app keeps logging 0 android apps). I dont see any other logs, so I don’t know if the server side code is not sending requests at all, or no valid request is being sent.

Feels like I have tried everything. What do you suggest to further debug the issue? 😕

Thanks!

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:20 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Sewdncommented, Apr 20, 2018

Ok, starting on it today.

I will pin the phonegap-plugin-push at 2.1.3 (and will test and develop against this version), since 2.2.x needs cordova-android 7.1.0 and Meteor 1.6.1.1 has support for cordova-android 6.4.0

Plugin doesn't support this project's cordova-android version. cordova-android: 6.4.0, failed version requirement: >=7.1.0
1reaction
FelixOBriencommented, Apr 28, 2018

Hey, I have a problem in receiving android messages with android 8.1, no error messages or anything. Notifications just don’t come through even when the server says that the message was sent successfully. I tried and failed to do the long alternative method with no outcome.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Notifications Not Showing Up? 10 Fixes You Can Try
Not seeing notifications show up on your Android phone? Try these fixes to get Android notifications working again.
Read more >
How to Fix Notifications Not Showing up on Android - Lifewire
Here are some of the ways to fix it when notifications are not showing up on your Android device. Check That Do Not...
Read more >
Android Notifications Not Working [ 2022 Ultimate Fixes]
Solution 1. Reboot The Phone · Solution 2. Check System and App Notification Settings · Solution 3. Disable Do Not Disturb Mode and...
Read more >
Notifications are not shown on Android 8 and 9 - Stack Overflow
I have tried the new Android 8 notification code: NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context, " ...
Read more >
Control notifications on Android - Google Support
Depending what notifications you want, you can change settings for certain apps or for your whole phone. Notifications show when you swipe down...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found