Notification showing only in topbar

0

Issue

i’m getting push notifications from onesignal, but when i get a push notification from onesignal or a local notification from LocalNotifications cordova plugin using trigger, in both cases i see the notification only in topbar, like this:

enter image description here

and if i have the device in background (non-active), i have the same issue… the issue is that when i receive the notification, i’m not receiving the notification like this:

enter image description here

i know that the above image is the notification display for ios, but android have a similar style to display the notification like the above image, i’m never getting the notification like that i’m only receiving the notification in topbar (pushing the icon of the app), and i think that may be is a preference or a thing is needed to add in config.xml file or something like that… (my device support that notification style), but i don’t know what is it…

here are some additional information:

cordova-android: 8.1.0
ionic CLI version: 5.2.7

device:

android version: 9.0

Solution

When we have to display floating notification on screen like whats app and others they did we need to ask for permission to users.

<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />

Answered By – Paresh Gami

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More