I am developing a Policy Manager for Android. Depending on a given set of rules and the current state of the device, it is supposed to restrict (allow/disallow) the user from starting certain applications.
I am thinking it should be a service running in the background, maybe intercepting all attempts to start applications, checking whether it is OK or not, and then starting them if they are allowed to run. It might also start and stop certain applications by itself, if the state of the device indicates this should be done.
Is there a way to do this programmatically? To control which applications are allowed to start at a certain time and which aren't? And also to stop applications that are already running?
In conclusion, is there a way to programmatically "intercept" attempts to start applications, and possibly deny these?