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.

cloud messaging not getting the message from firebase

See original GitHub issue

i am using nativescript firebase and when i push message from firebase console then message is not received on android app . but when i use curl -X POST --header "Authorization: key=SERVER_KEY" --Header "Content-Type: application/json" https://fcm.googleapis.com/fcm/send -d "{\"notification\":{\"title\": \"My title\", \"text\": \"My text\", \"badge\": \"1\", \"sound\": \"default\"}, \"data\":{\"foo\":\"bar\"}, \"priority\": \"High\", \"to\": \"DEVICE_TOKEN\"}" then i will receive the message on my app

i have provided the same server_key and device_token on google-services.json but its only working on local side not with the firebase web app

may be this issue is related to https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/1039

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
marcelomiranda90commented, Nov 25, 2018

the file must be in:

app/App_Resources/Android/src/main/res/values/strings.xml

after including the channel id, your strings.xml should look like this:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string translatable="false" name="app_name">name of app</string>
    <string translatable="false" name="title_activity_kimera">name of app</string>
    <string name="default_notification_channel_id" translatable="false">default</string>
</resources>

after saving the change, run:

tns platform remove android tns run android

1reaction
marcelomiranda90commented, Nov 24, 2018

I had this problem, I believe it is related to the notification channel that api 26 should be configured for users to receive the notifications, follow the steps to have the problem solved.

put this in your strings.xml <string name="default_notification_channel_id" translatable="false">default</string>

put this in your AndroidManifest.xml

<application …> <meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="@string/default_notification_channel_id"/> … </ application>

more https://medium.com/globallogic-latinoamerica-mobile/firebase-cloud-messaging-warning-updating-to-android-oreo-1343fe894bd5

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firebase cloud messaging notification not received by device
I am having an issue with FireBase Cloud Messaging ...
Read more >
Receive messages in an Android app - Firebase - Google
In some situations, FCM may not deliver a message. This occurs when there are too many messages (>100) pending for your app on...
Read more >
Firebase Cloud Messaging (FCM) Troubleshooting Guide
Check the Sender ID · Background data needs to be enabled on devices. · Notifications are not enabled for the application itself. ·...
Read more >
Cloud Messaging | FlutterFire
Messaging currently only supports usage with the default Firebase App instance. Receiving messages#. iOS Simulators. FCM via APNs does not work on iOS ......
Read more >
Notifications Not Shown - Mobile Push
When an app is in a Force Stopped / Force Killed state most events including FCM messages for push notifications will not be...
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