I have a service running every hour. It works fine. But I would like the service to be able to check to see if one of my activities (Main or others) is in the foreground. That way I can skip the service's routines till the next hour. I know I could probably do this with setting a flag in the Activity_resume and _pause, but is there a simple command instead?