views:

102

answers:

1

Hi Guys,

I know this question has been asked in similar forms before, but I found no real answer about the following issue:

On my Nexus One there's a widget to toggle on/off several things on my phone like wlan, bluetooth, gps,..

Why does this widget has access to the GPS, without forwarding me to the settings screen?

And how can I use this functionality in my own apps?

On many sites it is mentioned, this is done because of security reasons...but in a strage way, this widget may do this? why? and the better question is: how?

Does someone have a clue?

+1  A: 

Why does this widget has access to the GPS, without forwarding me to the settings screen?

Because the widget was developed by the firmware authors, the same people who wrote the Settings screen.

And how can I use this functionality in my own apps?

You can't, as of Android 1.5. Sorry!

On many sites it is mentioned, this is done because of security reasons

Because users who ask for GPS to be disabled do not appreciate applications deciding on their own to re-enable it.

CommonsWare