|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.device.DeviceManager
public class DeviceManager
The DeviceManager class provides support to get and set the device configurations.
Constructor Summary | |
---|---|
DeviceManager()
|
Method Summary | |
---|---|
void |
enableHomeKey(boolean enable)
Enable/Disable device HOME KEY |
void |
enableStatusBar(boolean enable)
Enable/Disable the device status bar |
java.lang.String |
getDeviceId()
Get the device product serial number |
boolean |
getDockerState()
Support i9000S(Android 4.3) only.Return the currently active docking station connected state . |
java.lang.String |
getTIDSN()
|
boolean |
setAPN(java.lang.String name,
java.lang.String apn,
java.lang.String proxy,
int port,
java.lang.String user,
java.lang.String server,
java.lang.String password,
java.lang.String mmsc,
java.lang.String mcc,
java.lang.String mnc,
java.lang.String mmsproxy,
int mmsport,
int authtype,
java.lang.String type,
java.lang.String protocol,
int bearer,
java.lang.String roamingprotocol,
boolean current)
Sets the APN (access point name) configurations for mobile data network |
boolean |
setCurrentTime(long when)
Sets the current wall time, in milliseconds. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeviceManager()
Method Detail |
---|
public java.lang.String getDeviceId()
public java.lang.String getTIDSN()
public boolean setCurrentTime(long when)
when
- in millisecondspublic void enableHomeKey(boolean enable)
enable
- value: false disable the Home KEY function. device reboot the state miss.
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  new DeviceManager().enableHomeKey(false);
}
protected void onDestroy() {
  new DeviceManager().enableHomeKey(true);
}
public void enableStatusBar(boolean enable)
enable
- Set to true to enable the status bar. Set to false to disable the status bar expand.
Note This status is not persistent. It will revert to the default condition (which is the enabled state) at th next rebootpublic boolean setAPN(java.lang.String name, java.lang.String apn, java.lang.String proxy, int port, java.lang.String user, java.lang.String server, java.lang.String password, java.lang.String mmsc, java.lang.String mcc, java.lang.String mnc, java.lang.String mmsproxy, int mmsport, int authtype, java.lang.String type, java.lang.String protocol, int bearer, java.lang.String roamingprotocol, boolean current)
apn
- APN name. Cannot be null.authtype
- Authentication type. Value:0(none) 1(PAP) 2(CHAP) 3(PAP or CHAP)bearer
- BEARER Radio Access Technology info.value: 0(none) 13(eHRPD) 14(LTE)mcc
- Mobile Country Code (MCC).mmsc
- MMSC URL.mmsproxy
- MMS proxy address.mmsport
- MMS proxy port.mnc
- MNC Mobile Network Code (MNC). Cannot be nullname
- Entry name. Cannot be nullpassword
- APN password.port
- Proxy port.protocol
- The protocol to use to connect to this APN. value: IP IPv6 or IPv4v6proxy
- Proxy address.roamingprotocol
- The protocol to use to connect to this APN when roaming.server
- Server address.type
- Comma-delimited list of APN types.user
- APN username.current
- enable current set this APN
public boolean getDockerState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |