-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Push Notification when app is in foreground? #925
Comments
to take your data notification in foreground and see your alert ,you can call the method finish() on your function push.on('notification', function(data). Like that : push.on('notification', function(data) { |
i can see alert when its in foreground, but only alert dialog. no sound, no vibration, no alert |
@omaismbakop what you are describing is the way the plugin should work. When the app is in the foreground it is up to you to display a dialog, play a sound or vibrate the device. |
i make it worked by setting forceShow true like this
|
Hi @omaismbakop , how about ios ? |
Yes, "forceShow": "true" is work for android. What about IOS? How can i get notification in forground IOS app. |
is there any option for force showing notification in iOS app? |
I found EBForeNotification, it can show the Banners and Sounds as the same as the system notifications on foreground in ios. |
This thread has been automatically locked. |
Expected Behaviour
should receive notification when app in background and foreground
Actual Behaviour
i am receiving notification when app in background but not when its in foreground
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Android 4.4
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Samsung
Cordova CLI version and cordova platform version
Plugin version
Sample Push Data Payload
Sample Code that illustrates the problem
Logs taken while reproducing problem
I tested, push notification code is executing each time when app starts, Code of initial function
The text was updated successfully, but these errors were encountered: