This topic describes how to get the state and state changes pertaining to various phone settings.
//Sample code to subscribe to state changes pertaining to various phone settings. try { Setting.subscribeListener(this); } catch (Exception e) { }
// Sample code implementing the SettingListener interface public void settingChanged(int setting, int value) { form.append("Getting state changes of phone settings. Setting is : " + setting + " and it's value is : " + value); }
//Sample code to get the state of flight mode Setting.getSetting(Setting.SETTING_FLIGHT_MODE);