Package com.unitech.api.deviceinfo
Class DeviceInfoCtrl
java.lang.Object
com.unitech.api.deviceinfo.DeviceInfoCtrl
The type General ctrl.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBundleGet Device Build NumberBundleGet Device Serial NumberBundlegetIMEI()Get IMEIBundlegetIMEI(int simSlot) Get IMEI with Sim SlotBundlegetIMSI()Get IMSIBundlegetIMSI(int simSlot) Get IMSI with Sim SlotBundlegetNetworkInformation(String iName) Get Network Information with interfaceName
-
Field Details
-
BUNDLE_ERROR_CODE
- See Also:
-
BUNDLE_ERROR_MSG
- See Also:
-
RESULT_CODE_ERROR
public static final int RESULT_CODE_ERROR- See Also:
-
RESULT_CODE_SUCCESS
public static final int RESULT_CODE_SUCCESS- See Also:
-
-
Constructor Details
-
DeviceInfoCtrl
public DeviceInfoCtrl(Context context) Instantiates a new General ctrl.- Parameters:
context- the context
-
-
Method Details
-
getDeviceSerialNumber
public Bundle getDeviceSerialNumber()Get Device Serial Number- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
String getDeviceSerialNumber=bundle.getString("getDeviceSerialNumber");
-
getDeviceBuildNumber
public Bundle getDeviceBuildNumber()Get Device Build Number- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
String getDeviceBuildNumber=bundle.getString("getDeviceBuildNumber");
-
getIMEI
public Bundle getIMEI()Get IMEI- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
String getImei = bundle.getString("getImei");
-
getIMEI
public Bundle getIMEI(int simSlot) Get IMEI with Sim Slot- Parameters:
simSlot- Sim Slot Number (int) ex: 0 (sim1) or 1 (sim2)- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
String getImei = bundle.getString("getImei");
-
getIMSI
public Bundle getIMSI()Get IMSI- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
String getImsi = bundle.getString("getImsi");
-
getIMSI
public Bundle getIMSI(int simSlot) Get IMSI with Sim Slot- Parameters:
simSlot- Sim Slot Number (int) ex: 0 (sim1) or 1 (sim2)- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
String getImsi = bundle.getString("getImsi");
-
getNetworkInformation
Get Network Information with interfaceName- Parameters:
iName- interfaceName (String) ex: eth0 or wlan0 or empty for current interface- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
String getIpAddress = bundle.getString("getIpAddress");
String getMACAddress = bundle.getString("getMACAddress");
String getInterfaceName = bundle.getString("getInterfaceName");
-