Hi
I have written code in my application to programmatically enable/
disable the airplane mode. This part of the application is working as
intended. However, I also wish to disable only specific radios when
the airplane mode is switched on. I found that there is the following
string constant in android.provider.Settings.system:

public static final String AIRPLANE_MODE_RADIOS
A comma separated list of radios that need to be disabled when
airplane mode is on. This overrides WIFI_ON and BLUETOOTH_ON, if Wi-Fi
and bluetooth are included in the comma separated list.

Constant Value: "airplane_mode_radios"


So, I tried to change this system setting in my code to be able to
disable only the WiFi radio in the airplane mode in the following way:

Settings.System.putString(context.getContentResolver
(),Settings.System.AIRPLANE_MODE_RADIOS, Settings.System.RADIO_WIFI);
                Settings.System.putInt(context.getContentResolver
(),Settings.System.AIRPLANE_MODE_ON, 1);


The problem is that doing this does not change the airplane mode as
intended. It still seems to switch off all the wireless interfaces.
I am using eclipse with the ADT plugin and using an Android 1.5 AVD
Emulator.
Can someone guide me on whether I am doing something wrong or if this
is not supported on the emulator?

Thanks
Akhilesh Gupta

--~--~---------~--~----~------------~-------~--~----~
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