Android 5.X+ When the app is in the background and a message is received, I get a notification in the notification bar but when clicking the notification, the app does not open.
Same issue here
Did you use FCM plugin before ?
yes I did, and then changed to this one. why do you ask?
On 17 Apr 2017 15:53, "Almya" notifications@github.com wrote:
Did you use FCM plugin before ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/arnesson/cordova-plugin-firebase/issues/233#issuecomment-294489548,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHSgOplpVjUMm_1YPGLKhbUudp7OPRQ5ks5rw27YgaJpZM4M4jI-
.
Because I had the same issue. If you use http on your server to send your notifications don't forget to remove the click_action from your message object.
ah brilliant. let me give it a try and will revert.
On 17 Apr 2017 20:18, "Almya" notifications@github.com wrote:
Because I had the same issue. If you use http on your server to send your
notifications don't forget to remove the click_action from your message
object.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/arnesson/cordova-plugin-firebase/issues/233#issuecomment-294549259,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHSgOlbBcfje9N72XbylkjL_BN2OXP2Dks5rw6zcgaJpZM4M4jI-
.
And first prize goes to Almya!! Thank you so much. The issue is resolved!
@pedrodagraca you're welcome ;)
Yep, the server side had:
$n = new Notification($title, $body);
return $n->setClickAction("FCM_PLUGIN_ACTIVITY")->setIcon('fcm_push_icon')->setSound('default');
I changed it to:
return $n->setIcon('fcm_push_icon')->setSound('default');
And now it works as expected
But what if you have the app in production.
if you remove the click_action old version wont open the app on notification tap, how would we go about defining a click action in cordova?
Same problem here
Most helpful comment
Because I had the same issue. If you use http on your server to send your notifications don't forget to remove the
click_actionfrom your message object.