push-plugin icon indicating copy to clipboard operation
push-plugin copied to clipboard

Show notification on system tray when app is in foregroud

Open emmanuel128 opened this issue 8 years ago • 3 comments

Is there a way to put a notification on tray when onMessageReceived callback is invoked?

emmanuel128 avatar Jun 08 '17 17:06 emmanuel128

@emmanuel128 You can achieve this for Android with a modification to the native code following the Notification Builder API - https://developer.android.com/reference/android/app/Notification.Builder.html

Example - https://github.com/NativeScript/push-plugin/blob/master/native-src/android/app/src/main/java/com/telerik/pushplugin/NotificationBuilder.java#L72

However, depending on your requirements there may be another API which you can use.

AntonDobrev avatar Jun 09 '17 14:06 AntonDobrev

I implemented using a local notification plugin, however I would like to show the notification like WhatsApp or text messages show it

emmanuel128 avatar Jun 09 '17 15:06 emmanuel128

19021970_1726215104059236_1472669433_n

emmanuel128 avatar Jun 09 '17 15:06 emmanuel128