|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.nokia.mid.setting.Setting
public final class Setting
Setting provides phone settings retrieving and change notification to client which implements SettingListener
Copyright (c) 2012 Nokia Mobile Phones
Code Snippet 1:
// This is a sample code to get the state of flight mode
Setting.getSetting(Setting.SETTING_FLIGHT_MODE);
Code Snippet 2:
// This is a sample code to subscribe/unsubscribe setting change notification
Setting.subscribeListener(this);
Setting.unSubscribeListener(this);
Code Snippet 3:
// This is a sample code to implement a SettingListener in a class which implements this interface
public void settingChanged(int setting, int value) {
form.append("recevie change notification. Setting is " + setting + " value is " + value);
}
Field Summary | |
---|---|
static int |
ACCEPT
Constant for dataconnection, roamingdataconnection setting. |
static int |
ASK
Constant for dataconnection, roamingdataconnection setting. |
static int |
DENY
Constant for dataconnection, roamingdataconnection setting. |
static int |
INVALID
Constant for invalid setting value. |
static int |
OFF
Constant for flight mode, vibrator, silence setting OFF. |
static int |
ON
Constant for flight mode, vibrator, silence setting ON. |
static int |
SETTING_BACKGROUND_DATA_CONNECTION
Constant for background data connection. |
static int |
SETTING_DATA_CONNECTION
Constant for data connection behavior. |
static int |
SETTING_FLIGHT_MODE
Constant for flight mode setting. |
static int |
SETTING_ROAMING_DATA_CONNECTION
Constant for roaming data connection behavior. |
static int |
SETTING_SILENT
Constant for silence. |
static int |
SETTING_VIBRATOR
Constant for vibrator. |
static int |
WIFIONLY
Constant for background dataconnection |
Method Summary | |
---|---|
static int |
getSetting(int index)
retreive phone setting. |
static void |
subscribeListener(SettingListener listener)
Subscribe phone setting change listener. |
static void |
unSubscribeListener(SettingListener listener)
unSubscribe phone setting change listener. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SETTING_FLIGHT_MODE
Constant for flight mode setting.
SETTING_FLIGHTMODE has the value 0x01.
public static final int SETTING_DATA_CONNECTION
Constant for data connection behavior.
SETTING_DATACONNECTION has the value 0x02.
public static final int SETTING_ROAMING_DATA_CONNECTION
Constant for roaming data connection behavior.
SETTING_ROAMINGDATACONNECTION has the value 0x03.
public static final int SETTING_VIBRATOR
Constant for vibrator.
SETTING_VIBRATOR has the value 0x04.
public static final int SETTING_SILENT
Constant for silence.
SETTING_SILENCE has the value 0x05.
public static final int SETTING_BACKGROUND_DATA_CONNECTION
Constant for background data connection.
SETTING_BACKGROUND_DATA_CONNECTION has the value 0x06.
public static final int INVALID
Constant for invalid setting value.
INVALID has the value 0x00.
public static final int ON
Constant for flight mode, vibrator, silence setting ON.
ON has the value 0x01.
public static final int OFF
Constant for flight mode, vibrator, silence setting OFF.
OFF has the value 0x02.
public static final int DENY
Constant for dataconnection, roamingdataconnection setting.
DENY has the value 0x03.
public static final int ASK
Constant for dataconnection, roamingdataconnection setting.
ASK has the value 0x04.
public static final int ACCEPT
Constant for dataconnection, roamingdataconnection setting.
ACCEPT has the value 0x05.
public static final int WIFIONLY
Constant for background dataconnection
WIFIONLY has the value 0x06.
Method Detail |
---|
public static void subscribeListener(SettingListener listener)
listener
- the object that will receive the phone setting change event.public static void unSubscribeListener(SettingListener listener)
listener
- the object that is receiving the phone setting change event.public static int getSetting(int index)
index
- the index of the setting.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |