Hi,  did you ever figure out how to do this?

On Dec 1 2008, 8:18 pm, RM <rick.manc...@gmail.com> wrote:
> Hi folks,
>
> I'm writing an app that will, among other things, disable Bluetooth.
> To do this, I've set the "android.permission.BLUETOOTH_ADMIN", and
> inside an onClick() listener I'm using the following:
>
>   Settings.System.putInt(getContentResolver(),
> Settings.System.BLUETOOTH_ON, 0);
>
> However, this does nothing on the actual phone.
>
> Further, using the corresponding getInt() function to readback the
> status crashes the app:
>
>   Settings.System.getInt(PowerProfile.this.getContentResolver(),
> Settings.System.BLUETOOTH_ON, btStatus);
>
> Can someone guide me as to what is wrong, and/or what is the proper
> way to enable/disable Bluetooth?
>
> Many thanks,
> RM
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to