-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Android - app doesn't come to foreground when clicking notification #1819
Comments
I'm experiencing the same issue with a payload with data only, with or without |
Help please, me too. ionic = 3.0.0-rc.2 |
I had this kind of a issue sometime ago. Problem was my payload was wrong. I was using the same payload for both Android and iOS. And found that Android payload should be different. something like this, (I don't know if it is the same issue) |
not my friend. |
This is a pretty serious issue. Any plans to fix it? |
@szh I can't reproduce this issue. What you are doing looks correct but one quick clarifying question. What is the |
@macdonst |
same |
@szh and @MarsupiL whelp a quick search for This is actually the behaviour I would expect from an app set to |
@macdonst Thanks, it works now! |
@szh I'm leaving this open until I update the docs |
Thanks @macdonst. I had indeed set up the lauchMode to singleInstance based on the recommendation from |
@MarsupiL as you probably already saw on the docs, and by interpreting the name, tldr: |
This thread has been automatically locked. |
Expected Behaviour
When clicking a data notification while the app is in the background (but still in memory), the app should launch.
Actual Behaviour
The on('notification') handler is called, but the app stays in the background and doesn't appear on the screen.
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Send a notification that contains a title and body as well as data key-value pairs, following the recommendation of the docs to put all the values in the 'data' object (see below for sample payload).
When the app is in the foreground, the on('notification') listener is called and the notification is not shown in the system tray, as expected.
When the app is no longer in memory, the notification shows in the system tray, and when clicked, the app opens and the on('notification') listener is called, as expected.
However, when the app is in the background but still in memory, the notification is shown in the system tray as expected, but when clicking the notification, only the on('notification') listener is called, but the app doesn't come to the foreground.
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Android 6.0
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Motorola Moto X 2nd Generation
Cordova CLI version and cordova platform version
7.0.1
6.3.2
Plugin version
2.0.0-rc5
Sample Push Data Payload
Sample Code that illustrates the problem
The text was updated successfully, but these errors were encountered: