I'd like to know if it possible to enable and disable Location Services programatically in Android 4.0?

I've found several approaches how to do this for previous versions of Android (for instance, [this](https://stackoverflow.com/questions/4721449/enable-gps-programatically-like-tasker) is the most popular link). But these approach does not work for Android ICS.

Also, I understand that an application should not do this but, for instance, default widget does this.

Can anybody clarify if it is possible and how to achieve this?