use the getString and putString method instead.  below is my code, but
I am having a problem that it always returns "1" (enabled) whether or
not the bluetooth is on...

                         String bluetoothEn =
android.provider.Settings.System.getString(getContentResolver(),
android.provider.Settings.System.BLUETOOTH_ON);
                         boolean blueToothEn = (bluetoothEn.equals("1"));

On Jan 23, 4:30 pm, MaxImUmZ <[email protected]> wrote:
> Use the WifiManager with getWifiEnabled and setWifiEnabled to do it
> for the wifi.  I have not found a way to do it for the bluetooth yet
> but only been working at it about an hour now
>
> On Dec 8 2008, 9:39 pm, Kah-Neth <[email protected]> wrote:
>
> > I am trying to use android.provider.Settings.System.getInt and putInt
> > to enable and disable bluetooth and enable/disable wifi as follows
> > android.provider.Settings.System.putInt(getContentResolver(),
> > android.provider.Settings.System.BLUETOOTH_ON,
> > enable);android.provider.Settings.System.putInt(getContentResolver(),
> > android.provider.Settings.System.WIFI_ON, enable);
> > However this does not seem to be working, does anyone have some advice
> > on how I should do this.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to