I have implemented push notification using gcm in my ionic 2 app, the notification works fine in background and foreground, but the issue is that when app is in foreground the notification doesn't appear in notification bar. Please help
You may refer with this forum:Ionic 2, Android notification received but banner not showing on device.
It stated that if the app is in the foreground, the notification is not shown in the system tray. That only happens when the notification is received while the app is in the background.
Additional references:
GCM notification doesn't show up in the notification bar. Android
push notification doesn't show up on status bar
Android - GCM push notifications not appearing in notifications list
Related
I am using react-native-notifications. I am getting push notifications perfectly but the issue is when the app is in the foreground and received push notifications. I clicked on the notification, the app reloads instead of resuming and the app is in the foreground all this time. It happens for every single push notification.
The event handler on click of push notification is being called and app reloads. I am just doing console in the handler.
Notifications.events().registerNotificationOpened()
Tried singleTop, singleTask, or singleInstance in manifest file. no luck
I have integrated OneSignal in ReactNative, now i am able to send and receive notifications. But after once notification is received into the mobile, then and there itself from the notification tray if user clears the notification without clicking it. Do we have any option to get all un-read notifications either with player_id and app_id
Looks like we can read the messages once we click on the notification which re-directs to the application.
I expect onesignal notifications should to able to retrieve the list of un-read notification using react-native sdk.
Can Someone help me with your ideas
Thanks.
I've implemented sendbird push notification in react-native. It's working fine when application is in background mode. but if application is in foreground mode then it's not display.
In code, I have also set sb.setForegroundState() and sb.setBackgroundState() method with application state.
So, anyone help me for solve out this ?
SendBird sends a push notification only when a user is disconnected. So, if the application is foreground and a user is connected, the app will not receive a push notification.
If you want to show a push notification when your application is in the foreground, you can show it using data in onMessageReceived() or onChannelChanged().
you can select "Send to devices both offline and online" from sendbird dashboard to receive notifications when the app is in the foreground
Sendbird -> Settings -> Notification -> Push notifications for multi-device users -> select "Send to devices both offline and online"
Our React Native app needs to send out push notification to a number of people (iOS and Android, app can be open, backgrounded, or closed), and when just one of these people performs a specific in-app action, we need our server to erase these push notifications from everyone's phones (again from either open, backgrounded, or closed). Is this possible to do for both iOS and Android?
You can send background notification (data notification if firebase) and implement frontend listeners to cancel all notifications received so far.
In my push notification service, my server sending some unwanted alerts also for various reasons,. I want to show particular notification alone in my notification center.Is that possible to hide the notification from server to device notification center.