Possible Duplicate:
Enable GPS programatically like Tasker
I'm a beginner android developer.
I want enable and disable GPS with a click of a button, without running this intent:
intente in = new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivity(in);
that brings me in the setting menu.
Is there a method to enable or disable GPS as in the android "Power Control" widget?
Thanks
EDIT:
The widget that I said is in the android system (version 1.6 on forward). There is an application (siriusapplications.com/powercontrolplus) that make want I want do, and extend the android power control.. my question is: how this persor can manage this?? –