Android Question How Can I check if an App is running in the background / foreground

Myr0n

Active Member
Licensed User
Longtime User
Hello

Someone knows how can I check if an App is running in the background or foreground?

I know the package name of that App, unfortunately is not my App is a third party app that my App depends on it and my app only can continue if that app is running, I can not start because it restart by it self.

I would like to intercept when this third party app is running, popup my app and when this app closed for any reason my App will save my app data and close it too.

Anyone have a hint?
 

Myr0n

Active Member
Licensed User
Longtime User
Hello
I forgot to mention that I found this thread that talks about almost the same thing but there is nothing clear there.

I this other thread
 
Last edited:
Upvote 0

Myr0n

Active Member
Licensed User
Longtime User
I think that I found the solution, I get back to you when is cooked.
 
Upvote 0
Top