Possible Duplicate:
Enable GPS programatically like Tasker
Is it possible to programmatically turn on/off gps on android? It is mentioned on this SO post: How can I enable or disable the GPS programmatically on Android? that it cannot be done without the user consent.