GPS Switch is an easy-to-use app which includes three widgets to enable, disable or toggle GPS status easily. Additionally not only GPS can be toggled but also mobile network location service.
This app can execute commands (enable/disable/toggle GPS) from other apps, e.g. Tasker. Use the following configuration for Tasker (New Task > System > Send Intent):
STATE:0 .. in order to enable GPS
STATE:1 .. in order to disable GPS
STATE:2 .. in order to toggle GPS
Toggling GPS status by apps is usually not allowed/supported by Android. Therefore this app requires root permissions! If you don’t know what this means, please do not install this app!
The free version of this app allows 10 operations (enable/disable/toggle) in order to verify the app works with your version of Android and your mobile device. Afterwards it is recommended to upgrade to the full version (inexpensive In-App purchase).
In case of any technical problem the author would like to receive a mail instead of a bad rating. Thank you.