I have implemented notification within service. Notification works fine. But in the case when app is running already and I clicked on android status bar notification it launches new copy of my app. which is obviously wrong. It should be if user click on status bar notification, should start app if app is not running already otherwise it should opens other activity (message activity in my case). I tried many suggestions provided in similar type of problem posted here but I didn't get solution in my case.
How about setting the launchMode to SingleInstance in the app's manifest.
There's also the trick I picked up on here about having a special NotificatonActivity that the notification calls:
Notification to restore a task rather than a specific activity?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With