That looks interesting - I found this:
"Applies to Broadcast Action:
Sent when the user is present after device wakes up"
But then found this:
ACTION_USER_PRESENT is broadcast only if there is a lock screen enabled. So, if the lock screen preference is set to none, this intent is never broadcast.
So it looks like if the device is locked, then it is obviously sleeping, and when the user unlocks it, then the user is probably looking at the screen. But this intent is only broadcast at that moment - which will be a different time than the time my action is scheduled.
An example of what I am looking for...
If the phone is asleep in a users pocket when the scheduled time triggers, I would like my app to know that the device was sleeping so that it will know to just run the scheduled action without prompting the user.
But, if the device is awake at the scheduled time, then that suggests the user is currently looking at the screen, so my app would instead pop-up a notification asking the user if they wish to perform the scheduled action.
I very much appreciate the ideas to help me figure this one out