It works quite well. I can receive the messages from our server and display an in-app notification. That’s ok but I want an android notification to be displayed (just like push notification on ios) when the app is in background.
I’m new on android development so I don’t even know if there is a built-in notification system in android. I tried to talk to the author of the plugin but he didn’t reply my emails.
Is it possible to display a notification when the app is in background?
Edit : This addon didn’t solve my problem completely. It does what is supposed to. It can show the notification in the notification center. The problem is, I still can’t trigger this notification when the app is in background because I can’t receive the GCM message when it’s in background. Currently, I can receive the GCM message and I can show a notification when only the app is in foreground
Yes it’s possible to have notifications triggered and shown in notification bar when your app is in background or when it is not running.
However, if you are expecting notification to be shown in the notification bar even if your app is in foreground, thats not a recommended way.
Here is our plugin which solves this issue. Cross Platform Native Plugins provides an unified access to use Local and Push notifications on iOS and Android with same lines of code(unifiedAPI). It has many other features (In-App purchases, Webview, Leaderboards & Achievements (coming soon) and more). Here is what notifications feature can do
Supports both Local and Remote Notifications.
Repeat Local Notifications for a time Interval
Customize the Keys you want to send in the payload
Custom Large Icon, Sound allowed
Support for setting small White icon on > 5.0 devices
Receive Launched start up notification
Receive notifications when in background or when app is not running