For example I want the user to be able to grant and deny access based on time/date/. To be able to specify the period e.g. 2 hours.
Other restriction that the user can use is: e.g. If I’m on 3G, this X
application should not be able to access my location.
If I’m on a Wi-Fi called work. This why application is able to access my location.
Any help would be appreciated.
As I see it, there are two posibillities:
If the “controlling app” and the “controlled app” are yours, just let them share a config file/database on the sd card and enable/disable geolocation according to settings there.
If the “controlled app” is not yours, there seems to be a way to control other apps persmissions on a rooted device according to this blog post.
They only link to apps that can do this and not to a programming guide, but this may be a good starting point for further research.