Enable GPS and network location programmatically on rooted phone?

Posted by Steve H on Stack Overflow See other posts from Stack Overflow or by Steve H
Published on 2010-05-03T21:42:56Z Indexed on 2010/05/03 21:48 UTC
Read the original article Hit count: 344

I'd like to write a simple widget that toggles GPS and network location on and off. I've read that it's not possible to do that normally, but presumably on a rooted phone it must be doable. Does anyone know what the code would be? (I only need the code to toggle the location providers, I know how to make the widget.) It doesn't matter that this isn't a 'good' solution, I don't plan to distribute the widget. If it matters, this would be on an HTC Hero, still running v1.5.

© Stack Overflow or respective owner

Related posts about android

Related posts about android-location