Package com.unitech.api.deviceinfo
Class DeviceInfoCtrl
java.lang.Object
com.unitech.api.deviceinfo.DeviceInfoCtrl
The type General ctrl.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDeviceInfoCtrl(android.content.Context context) Instantiates a new General ctrl. -
Method Summary
Modifier and TypeMethodDescriptionandroid.os.BundleGet Device Build Numberandroid.os.BundleGet Device Serial Numberandroid.os.BundlegetIMEI()Get IMEIandroid.os.BundlegetIMEI(int simSlot) Get IMEI with Sim Slotandroid.os.BundlegetIMSI()Get IMSIandroid.os.BundlegetIMSI(int simSlot) Get IMSI with Sim Slotandroid.os.BundlegetNetworkInformation(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(android.content.Context context) Instantiates a new General ctrl.- Parameters:
context- the context
-
-
Method Details
-
getDeviceSerialNumber
public android.os.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 android.os.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 android.os.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 android.os.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 android.os.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 android.os.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");
-