This is the bit I have trouble understanding. If you are calling an Activity it will always call Activity_Create and/or Activity_Resume.
Yes, and that is the problem. It works 100%, but only if the user doesn't close the app. If the app is killed and the service tries to open the activity, then you have a blank activity with 0 response, no triggers, nothing.
Steps to reproduce:
Create a Starter service that restarts itself every 1 minute or 10 seconds ( the time is not important here ).
Every time the user is present ( unlocks the phone screen ), you start an activity.
It will work, every single time.
Now, close the app using the "recent apps" list. Your service will still be alive and will restart.
Now with the app closed, the serviece will try to start the activity again, if you unlock your celphone ( UserPresent trigger )
Now you will have a blank activity.
I tried many workarounds, no success. I tested the app in different devices, same problem. It seems like basically there is no more activity to open after the user closes your app, that's why we have a blank activity.
A simple way to prevent this behavior is to hide my app on the recent apps list. This way the user should use an option inside the app to close it, then i can stop the service as well. Not perfect, maybe not even a good solution, but i have no choice.
Thanks for your time and reply.