I want to have my music player app launch when the user gets into his car. But if he has loaded a satnav (e.g. google maps) then I would like my app to run in the background.
I already have the code launch my app when the user gets into the car. What I'd like to know is how to determine if some sort of satnav app is in the foreground.
This question explains how to tell what app is in the foreground. But given that information, how can I tell if it's a satnav or maps application, without explicitly checking a list of package names? For example, could I find out what intents the foreground application can listen to? And are there any such intents which would suggest it is a satnav application?
Thanks