Push Notifications not working on RN0.62.2 - android

In JS, using firebase.messaging().getToken();, I'm able to successfully get an FCM token.
I'm going into our project in Firebase and sending a test notification to this device.
The notification does not appear on my device.
So:
1.I'm able to generate an FCM token and correctly access it
2.No errors in Android Studio or during the build
3.No errors in my JS console
4.I'm not able to RECEIVE the push notification. Nothing happens. I've tried looking in the logs in android studio, but I'm not seeing anything (and the logs seem to stop running when my app is closed/in the background)

Related

Android notification via Notification hub "The Push Notification System handle for the registration is invalid"

I am rewriting an app from Xamarin to Flutter, I have been struggling with push notification for some time now.
I followed this guide: https://learn.microsoft.com/en-us/azure/developer/mobile-apps/notification-hubs-backend-service-flutter
I have implemented everything for Android and the cross platform code. Not yet started with IOS. The backend and notification hub is up and running for the Xamarin project, which I know is working.
When I register the device I get a 200 and it seems to be working. When I run a test push in Notification hub I get this:
Image of error code in Notification hub
When I try to send one more push I get nothing until I deregister and register again and I will get the error again.
When registering I use push channel, deviceId, platform, and a tag.
I have added the google-services.json file in the app folder of the android project.
Suggest you to check if the notification hub is configured correctly and tags or tag expressions are used correctly. Also, registration needs to be re-register everytime your app start-up.
You may refer to this article for troubleshoot: Diagnose dropped notifications in Azure Notification Hubs

No push notifications on React Native standalone android build using expo-notifications package

Current project:
SDK Version - 39.0.0
Android standalone build
Hello there!
I having no push notifications on standalone build, what i did:
added firebase account with app info provided in app.json
putted google-services.json into app root and added path in expo.android.googleServicesFile in app.json
added key with expo push:android:upload --api-key <my-key> and tried to change it with a new one
added android push notification channel in application
Just in case, tried to send push notification on device token from getDevicePushTokenAsync() directly with firebase endpoint using my key and everything works.
long story short - did everything according documentation. In case of certain changes, expo.io needs FCM for sending push notifications via expo packages.
sending push notification on token from getExpoPushTokenAsync() doesn’t work at all except iPhone build.
Could you please help me with my problem? maybe i lost something in my steps to make my push notification work properly?

Push Notification dont pop up

I created an Android App with Android Studio. Now I want to do push notifications with Google Firebase.
I have everything set up.
Everything is working well.
This is the problem:
When I send a cloud message to my device as a test, it works. However, when I send a cloud message normally, not as a test, nothing happened.
It does work with Android Studio.
It makes no difference if the app is open or closed.
Why does it not work?
If use Android upper Oreo. Need setup channel id and configurate him (sound, priority) https://developer.android.com/training/notify-user/channels
and after in firebase message add channel id.

Appcelerator Android GCM Error 3009

Push notifications have stopped working for me. I have tried sending notifications through the Appcelerator dashboard but the request fails with the log GCM Error 3009 (see image attached below). My GCM configuration with Appcelerator's Arrow Cloud Service has not changed and has worked previously. I did update my project from 5.3 to 5.5.1 but going back to the previous version didn't fix the issue.
On the app side, I confirm that I am successfully getting a push notification token, logging into ACS, and subscribing to a channel.
Because Arrow Cloud Service is our server in relations to GCM, I'm not sure what I can do.
What worked for me was:
1) log the device token of the device not receiving the push,
2) in the appc dashboard, go to the Devices tab and unsubscribe the android device with the matching token.
3) re-launch the app, make sure you're subscribed successfully, and the device should now receive push notifications.

not receiving firebase notification from console

i am not receiving notification after sending it through firebase console , i tried sending many notification but received one or two from around 20 notifications, i followed this guide firebase messaging from github
,why am i not receiving notification, my app is installed in one emulator and in one of my phone but when i receive notification which i have sent through notification panel i get them either on phone or emulator never got them on both.
below is the screenshot of my console
check your android app configuration in firebase console
use a restful client to make the request, i suggest
chrome-extension://aejoelaoggembcahagimdiliamlcdmfm/dhc.html,
there you can see the response of the request, if your request are sent sucessfully or if you have error, and the response tells what kind of error you have
check android app , in the method onMessageReceived and print everything to see if you receive information, besides you can print the property "from" who is the id_number of your proyect, and you can see if the messages come from your firebase android app
check firebase documentation.
I've implemented everything just with the guides and its working pretty well
I solved the same problem.
The problem seems to be the browser compatibility/version. Mozilla Firefox could easily handle this.
Make sure your app is running in the background.
Open the Firebase notification console in the FireFox browser and send notifications.
Make sure token is generated
FirebaseInstanceId.getInstance().getToken();
in my case, the package name defined at firebase console isn't the same as defined on gradle and manifest of the app (i changed it one time in the app), so the app won't be able to receive notifications sent from firebase console.
They both have to be the same!
I did not add a new firebase project, just go to project settings at console and add new android app with another package name and have a look at the newly generated google-services.json and change some lines at you android studio project.
Besides the tips that Pavul Zavala said ، keep this in mind that just data message can received by FirebaseMessagingService even application closed or run in background and notification message can't handle(till this moment) when application run in background.
And all message that sent via FireBase console Contains , they always include a notification key
more detail at :
Push notification works incorrectly when app is on background or not running
In my case, what helped me is creating a new simulator in Android Studio
Few things to check:
in Firebase console https://console.firebase.google.com/ add/configure the project
in Android Studio connect to Firebase - Manu -> Tolls -> Firebase -> Cloud Messaging (Connect, Add FCM to your app)
Send notification from Firebase console
So, again, I recreated Virtual Device (open AVD manger and create the same device with the same API level)
I will be happy if somebody will save the time using this post :)
Ideally it shouldn't behave like that but it might be due to following reasons:
Check the notification priority of your app in the app settings of the device.
You might be sending the token of one particular device, Your target should be User segment.

Categories

Resources