I wish to know if Android 2.1 SDK support APIs for changing network settings such as bluetooth on/off, wifi on/off , airplane mode on/off. Thank you!
A:
Looking at the official API docs, it seems that bluetooth and wifi settings are readonly, but airplane mode can be set.
Martinho Fernandes
2010-02-14 17:44:39
A:
Yes, you can enable/disable wifi with WifiManager
and Bluetooth with BluetoothAdapter
. However, your app will need the associated permissions to change either of the settings.
Erich Douglass
2010-02-14 18:41:29
Thank you guys for your replies! Erich, what do you mean by associated permissions? I am kind of new in Android development. You mentioned WifiManager and BluetoothAdapter, what about enabling/disabling calling and sms functions? Basically i want to write a small app for my phone that blocks receiving calls and sms from certain numbers (Blacklist). Thanks guys!
Alex
2010-02-14 23:03:44