I’m building an Android app, and I’ve implemented Push Notification.
However I’m getting ‘SCHEDULED’ status message when sending a Push Notification, but I haven’t been able to actually receive it on my Android device. Any reasons for that?
I’ve used that deviceToken from backendless to specify FCM registration token on Firebase console in order to send the notification, however that was not working either.
Also I’ve noticed that in your documentation you’ve written that we need only two dependencies for Push Notifications:
I’ve used that deviceToken from backendless to specify FCM registration token on Firebase console in order to send the notification, however that was not working either.
This indicates that problem somewhere outside Backendless since your device didn’t receive notifications even directly from Firebase.
On this forum we help to troubleshot problems related to Backendless platform.
I would advice you to try to figure out why your device doesn’t receive push notifications from Firebase since root of problem lies there.
I’ve actually now tested Firebase Cloud Messaging, Test Push notification and I’m able to get it while my app is in the background. If I want to receive it in the foreground I would need to implement ‘FirebaseMessagingService’. However I’ve already declared your ‘BackendlessFCMService’ in my AndroidManifest file. So a backendless implementation should handle that instead. But I’m not able to receive the notification from backendless even if my app is in the background.
I’ve also successfully registered my device from MainActivity as well:
val channels: MutableList<String> = ArrayList()
channels.add("default")
Backendless.Messaging.registerDevice(
channels,
object : AsyncCallback<DeviceRegistrationResult?> {
override fun handleResponse(response: DeviceRegistrationResult?) {
Log.d("MainActivity", "${response?.deviceToken}")
}
override fun handleFault(fault: BackendlessFault) {
Log.d("MainActivity", fault.message)
}
})
And from my ViewModel, I’m using a Real Time database to trigger the Push Notification every time there’s an update in the table. I’m able to successfully print the MessageStatus whenever that happens. It says that notification was published/scheduled, but I’m not receiving it.
Also I’ve checked the notification option for my app. And notifications are enabled. However an option called ‘Pop on screen’ wasn’t enabled by default, which I’ve changed. But even after that I’m still unable to receive the push notification.
The status that I received is: PUBLISHED
I was able to get a test notification from Firebase while my app was in the background. However I wasn’t able to receive a notification from backendless either from background or foreground.
I’m triggering a push notification when I manually change one element in my database table, and that works perfectly fine, however I don’t see a notification on my device.
Thank you for the information. I created an app based on your google-services.json and registered my device in your app. Then I sent a push notification from Backendless Console and received it. Here is my project. Support Push.zip (903.5 KB)
Hi Inna, I’ve downloaded and tested your project, it works! I’ve sent a push notification from my backendless dashboard.
However with my app, I’m still facing the issue, and I do not have a clue what’s going on, because I did everything the same. I’m registering device in my activity’s onCreate method. But still not receiving it. It’s been 2 weeks and it really start’s to go on my nerves.
Can I send you my project, so that you can just change the app/api key with your own and start the app? Because in my MainActivity I’m doing all the work for initializing the backendless and registering the app.