I have just integrated services into my android app - I am also using startForeground because it's a critical app.
So, my question is - how do I get it to revert the user to the application when they have done a keyPress on the notification / service in their Notification Panel. I have looked everywhere for this and can't find it anywhere...There isn't much point in using services if they don't get directed back to the app onKeyPress so really need to get this working.
Any help is much appreciated.
Thanks
If the user clicks on the entry in the notification panel (via touchscreen or D-pad), the
PendingIntent
you supplied viasetLatestEventInfo()
will be executed. Use an appropriatePendingIntent
to bring up the activity you seek. Here is a sample application demonstrating this.