I work in an application where I filter when the screen is on or off, and run the action when the screen is on, but once it starts the activity, but the action has already begun, I would like to ask you, it was any way to find out inside my application if activity is already running.
When I run the action, I added this code
intent11.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Thank you very much.
source share