You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I open my app, put it in background by pressing home button and send a notification (via this service). The notification is received and is shown in the statusbar. But nothing happens when I tap on the notification - I get back to home screen and the app is not shown.
If the app is in foreground, 'onNotificationOpen' callback works as expected and I can see notification object.
And if I use plugin cordova-push-notifications, the app is successfully opened after tapping the notification.
LKruglov
changed the title
Tapping notification not moving the app to foreground (Android)
Tapping notification does not move the app to foreground (Android)
Mar 7, 2018
What I had to do was to change payload format.
Other suggested removing "notification" entirely and move title and body inside data.
But it caused same issue - tapping not open app - on iOS.
I guess click_action => FCM_PLUGIN_ACTIVITY is causing problem.
To be safe, I removed all others except title and body from notification.
I open my app, put it in background by pressing home button and send a notification (via this service). The notification is received and is shown in the statusbar. But nothing happens when I tap on the notification - I get back to home screen and the app is not shown.
If the app is in foreground, 'onNotificationOpen' callback works as expected and I can see notification object.
The code (called inside 'deviceready' handler):
cordova: 8.0.0
cordova android: 6.4.0
device: HTC 10 with Android 7.0
plugin list:
cordova-plugin-battery-status 1.2.5 "Battery"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-contacts 2.3.1 "Contacts"
cordova-plugin-device 1.1.7 "Device"
cordova-plugin-device-motion 1.2.5 "Device Motion"
cordova-plugin-device-orientation 1.0.7 "Device Orientation"
cordova-plugin-dialogs 1.3.4 "Notification"
cordova-plugin-directions 0.4.4 "Directions"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-firebase 0.1.25 "Google Firebase Plugin"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-globalization 1.0.9 "Globalization"
cordova-plugin-inappbrowser 1.7.2 "InAppBrowser"
cordova-plugin-media 3.0.1 "Media"
cordova-plugin-media-capture 1.4.3 "Capture"
cordova-plugin-network-information 1.3.4 "Network Information"
cordova-plugin-statusbar 2.4.1 "StatusBar"
cordova-plugin-vibration 2.1.6 "Vibration"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.3.2 "SocialSharing"
cordova-push-notifications 1.2.4 "Push Notifications Plugin"
cordova-social-vk 1.0.5 "SocialVk"
es6-promise-plugin 4.2.2 "Promise"
ionic-plugin-keyboard 2.2.1 "Keyboard"
The text was updated successfully, but these errors were encountered: