I have been trying to get an Android service to take pictures in the background using the action.USER_PRESENT trigger. Suprisingly enough, it works.
I am confused about the mechanisms involved however. Going to list some points below, please correct where I am wrong.
- When an intent filter is registered in the BroadCastRecevier via manifest, it will be triggerred even if the app is closed, correct?
- The created service runs its methods on a newly created thread, and will execute until end, no matter what.
- What are the mechanistic differences in how the service behaves when the app is open, in the background (or stopped in some devices), or destroyed?
- action.USER_PRESENT triggers when the user passes his lockscreen?
In addition, I would invite suggestions to alternative triggers to USER_PRESENT, when my condition is that the service be triggered whenever the user is using his device.