com.ardic.android.managers.devicestatus.IDeviceStatusManager |
Provides a set of APIs for miscellaneous device status information such as cellular info, storage info, network usage info, etc. on the device.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns Afex SDK (Software Development Kit version) Version (API LEVEL)
| |||||||||||
Returns the user-visible SDK version of the framework.
| |||||||||||
Returns android version code.
| |||||||||||
Returns current available internal memory (userdata) size information.
| |||||||||||
Returns the current available Random Access Memory (RAM) information.
| |||||||||||
Returns current battery usage percentage [0-100].
| |||||||||||
Returns current battery scale.
| |||||||||||
Returns current battery source.
| |||||||||||
Returns current battery temperature in celcius.
| |||||||||||
Returns current battery voltage in mV.
| |||||||||||
Returns bluetooth MAC address.
| |||||||||||
Returns build display id.
| |||||||||||
Returns current date.
| |||||||||||
Returns current time.
| |||||||||||
Returns current timezone information.
| |||||||||||
Returns current connected wifi APN SSID.
| |||||||||||
Returns the manufacturer of the product/hardware.
| |||||||||||
Returns the end-user-visible name for the end product.
| |||||||||||
Returns the model number of the device.
| |||||||||||
Returns the name of the industrial design.
| |||||||||||
Returns string convention of version code of android.
| |||||||||||
Returns the name of the underlying platform
| |||||||||||
Returns A hardware serial number, if available.
| |||||||||||
Returns device unique id
| |||||||||||
Returns the IP address currently assigned to the device for a Wi-Fi Connection.
| |||||||||||
Returns mobile data received (download) information.
| |||||||||||
Returns mobile data sent (upload) information.
| |||||||||||
Returns mobile (cellular) data total (upload+download) information.
| |||||||||||
Returns registered network cell information as
CellInfo if it is not registered,
returns null. | |||||||||||
Returns complete voice mail number.
| |||||||||||
Returns the unique device ID.
| |||||||||||
Returns ISIM (IP Multimedia Services Identity Module) Domain.
| |||||||||||
Returns ISIMIMPI IP Multimedia Services Identity Module, IP Multimedia Private Identity.
| |||||||||||
Returns the phone number string for line 1.
| |||||||||||
Return Telephony MSISDN (Mobile Subscriber Integrated Services Digital Network-Number)
| |||||||||||
Returns the neighboring cell(s) information of the device.
| |||||||||||
Returns the numeric name (MCC+MNC) of current registered operator.
| |||||||||||
Returns the alphabetic name of current registered operator.
| |||||||||||
Returns a constant indicating the radio technology (network type) currently in use on the
device for data transmission.
| |||||||||||
Returns the version string for the radio firmware.
| |||||||||||
Returns the ISO country code equivalent of the current registered operator's MCC (Mobile
Country Code).
| |||||||||||
Returns the MCC+MNC (mobile country code + mobile network code) of the provider of the SIM.
| |||||||||||
Returns the Service Provider Name (SPN).
| |||||||||||
Returns the SIM serial number (Integrated Circuit Card ID (ICCID)), if applicable.
| |||||||||||
Returns a constant indicating the state of the device SIM card.
| |||||||||||
Returns the unique subscriber ID, for example, the IMSI for a GSM phone.
| |||||||||||
Retrieves the alphabetic identifier associated with the voice mail number.
| |||||||||||
Returns the voice mail number.
| |||||||||||
Returns current voice message count.
| |||||||||||
Returns current total internal memory (userdata) size information.
| |||||||||||
Returns total (wifi and mobile) received (download) network information.
| |||||||||||
Returns total (wifi and mobile) sent (upload) network information.
| |||||||||||
Returns total (wifi and mobile) sent and received (upload and download) network information.
| |||||||||||
Returns total Random Access Memory (RAM) information.
| |||||||||||
Returns wifi total received (download) network information.
| |||||||||||
Returns wifi total sent (upload) network information.
| |||||||||||
Returns wifi total (sent and received / upload and download) network information.
| |||||||||||
Returns the hardware address of the wifi.
| |||||||||||
Returns bluetooth support information.
| |||||||||||
Returns current connected wifi APN SSID is hidden or not.
| |||||||||||
Returns device rooted info.
| |||||||||||
Returns availability of external memory on the device.
| |||||||||||
Returns true if the device is considered roaming on the current network.
| |||||||||||
Register Api License Listener Call this api in Activity or Service's onCreate(Bundle)
Normally listeners are added in an Activity or Service's onCreate(Bundle) and removed in
onDestroy().
| |||||||||||
Registers to sim state changes with callback function.
| |||||||||||
Unregister Api License Listener Call this api in Activity or Service's onDestroy(Bundle)
| |||||||||||
Unregisters from sim state changes with callback function.
|
Returns Afex SDK (Software Development Kit version) Version (API LEVEL)
Returns | |
---|---|
int |
Afex Sdk Version as integer ERROR(/AfexBuild.API_LEVELS#API_LEVEL_1) ,
ERROR(/AfexBuild.API_LEVELS#API_LEVEL_2) |
Throws | |
---|---|
AfexException |
Returns current available internal memory (userdata) size information.
Returns | |
---|---|
DataSizeUnit |
DataSizeUnit |
Throws | |
---|---|
AfexException |
Returns the current available Random Access Memory (RAM) information.
Returns | |
---|---|
DataSizeUnit |
DataSizeUnit |
Throws | |
---|---|
AfexException |
Returns current battery temperature in celcius. (For example, 28.6 °C)
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
Returns string convention of version code of android. (For example "JELLY_BEAN")
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
Returns A hardware serial number, if available. Alphanumeric only, case-insensitive.
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
Returns the IP address currently assigned to the device for a Wi-Fi Connection.
Returns | |
---|---|
String |
Formatted and comma-separated IP addresses or "". |
Throws | |
---|---|
AfexException |
Returns mobile data received (download) information.
Returns | |
---|---|
DataSizeUnit |
DataSizeUnit |
Throws | |
---|---|
AfexException |
Returns mobile data sent (upload) information.
Returns | |
---|---|
DataSizeUnit |
DataSizeUnit |
Throws | |
---|---|
AfexException |
Returns mobile (cellular) data total (upload+download) information.
Returns | |
---|---|
DataSizeUnit |
DataSizeUnit |
Throws | |
---|---|
AfexException |
Returns registered network cell information as CellInfo
if it is not registered,
returns null.
IDeviceStatusManager deviceStatusManager = DeviceStatusManager.getInterface(mContext); CellInfo cellInfo = deviceStatusManager.getRegisteredCellTowerInfo(); if (cellInfo instanceof CellInfoGsm) { CellInfoGsm gsm = (CellInfoGsm) cellInfo; txtCellTowerInfo.setText("Cid: " + gsm.getCellIdentity().getCid() + "\n" + "Lac: " + gsm.getCellIdentity().getLac() + "\n" + "Mcc" + gsm.getCellIdentity().getMcc() + "\n" + "Mnc" + gsm.getCellIdentity().getMnc() + "\n" + "Asu Level: " + gsm.getCellSignalStrength().getAsuLevel() + "\n"); } else if (cellInfo instanceof CellInfoCdma) { CellInfoCdma cdma = (CellInfoCdma) cellInfo; txtCellTowerInfo.setText("Base Station Id: " + cdma.getCellIdentity().getBasestationId() + "\n" + "Latitude: " + cdma.getCellIdentity().getLatitude() + "\n" + "Longtitude: " + cdma.getCellIdentity().getLongitude() + "\n" + "Network Id: " + cdma.getCellIdentity().getNetworkId() + "\n" + "System Id: " + cdma.getCellIdentity().getSystemId() + "\n" + "Asu Level: " + cdma.getCellSignalStrength().getAsuLevel()); } else if (cellInfo instanceof CellInfoLte) { CellInfoLte lte = (CellInfoLte) cellInfo; txtCellTowerInfo.setText("Ci: " + lte.getCellIdentity().getCi() + "\n" + "Mcc: " + lte.getCellIdentity().getMcc() + "\n" + "Mnc: " + lte.getCellIdentity().getMnc() + "\n" + "Pci: " + lte.getCellIdentity().getPci() + "\n" + "Tac: " + lte.getCellIdentity().getTac() + "\n" + "Asu Level: " + lte.getCellSignalStrength().getAsuLevel()); }
Returns | |
---|---|
CellInfo |
CellInfo |
Throws | |
---|---|
AfexException |
Returns the unique device ID. For example, the IMEI for GSM and the MEID or ESN for CDMA phones.
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
Returns ISIM (IP Multimedia Services Identity Module) Domain.
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
Returns ISIMIMPI IP Multimedia Services Identity Module, IP Multimedia Private Identity.
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
Returns the phone number string for line 1. For example, the MSISDN for a GSM phone.
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
Return Telephony MSISDN (Mobile Subscriber Integrated Services Digital Network-Number)
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
Returns the neighboring cell(s) information of the device.
Returns | |
---|---|
List<NeighboringCellInfo> |
List of NeighboringCellInfo |
Throws | |
---|---|
AfexException |
Returns the numeric name (MCC+MNC) of current registered operator.
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
Returns the alphabetic name of current registered operator.
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
Returns a constant indicating the radio technology (network type) currently in use on the device for data transmission.
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
Returns the version string for the radio firmware. May return null (if the radio is not currently on).
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
Returns the ISO country code equivalent of the current registered operator's MCC (Mobile Country Code).
A mobile network code (MNC) is used in combination with a mobile country code (MCC) (also known as a "MCC / MNC tuple") to uniquely identify a mobile phone operator/carrier using the GSM/LTE, CDMA, iDEN, TETRA and UMTS public land mobile networks and some satellite mobile networks.
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
See also:
Returns the MCC+MNC (mobile country code + mobile network code) of the provider of the SIM. (SIM OPERATOR CODE)
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
Returns the SIM serial number (Integrated Circuit Card ID (ICCID)), if applicable.
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
Returns a constant indicating the state of the device SIM card.
Possible return values are;
Returns | |
---|---|
int |
String |
Throws | |
---|---|
AfexException |
Returns the unique subscriber ID, for example, the IMSI for a GSM phone.
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
Retrieves the alphabetic identifier associated with the voice mail number.
Returns | |
---|---|
String |
String |
Throws | |
---|---|
AfexException |
Returns current total internal memory (userdata) size information.
Returns | |
---|---|
DataSizeUnit |
DataSizeUnit |
Throws | |
---|---|
AfexException |
Returns total (wifi and mobile) received (download) network information.
Returns | |
---|---|
DataSizeUnit |
DataSizeUnit |
Throws | |
---|---|
AfexException |
Returns total (wifi and mobile) sent (upload) network information.
Returns | |
---|---|
DataSizeUnit |
DataSizeUnit |
Throws | |
---|---|
AfexException |
Returns total (wifi and mobile) sent and received (upload and download) network information.
Returns | |
---|---|
DataSizeUnit |
DataSizeUnit |
Throws | |
---|---|
AfexException |
Returns total Random Access Memory (RAM) information.
Returns | |
---|---|
DataSizeUnit |
DataSizeUnit |
Throws | |
---|---|
AfexException |
Returns wifi total received (download) network information.
Returns | |
---|---|
DataSizeUnit |
DataSizeUnit |
Throws | |
---|---|
AfexException |
Returns wifi total sent (upload) network information.
Returns | |
---|---|
DataSizeUnit |
DataSizeUnit |
Throws | |
---|---|
AfexException |
Returns wifi total (sent and received / upload and download) network information.
Returns | |
---|---|
DataSizeUnit |
DataSizeUnit |
Throws | |
---|---|
AfexException |
Returns bluetooth support information.
Returns | |
---|---|
boolean |
true if bluetooth supported on the device else false |
Throws | |
---|---|
AfexException |
Returns current connected wifi APN SSID is hidden or not.
Returns | |
---|---|
boolean |
true if connected APN is hidden else false |
Throws | |
---|---|
AfexException |
Returns device rooted info.
Returns | |
---|---|
boolean |
true if device has been rooted else false |
Throws | |
---|---|
AfexException |
Returns availability of external memory on the device.
Returns | |
---|---|
boolean |
true if external memory exists on the device else false |
Throws | |
---|---|
AfexException |
Returns true if the device is considered roaming on the current network. Availability: Only when user registered to a network.
Returns | |
---|---|
boolean |
true if roaming else false |
Throws | |
---|---|
AfexException |
Register Api License Listener Call this api in Activity or Service's onCreate(Bundle) Normally listeners are added in an Activity or Service's onCreate(Bundle) and removed in onDestroy().
It is safe to call this method from the main thread.
Parameters | |
---|---|
listener |
ApiLicenseListener :
The listener to send notifications to |
handler |
Handler :
Handler identifying the thread to use for notifications, null for the
main thread |
Returns | |
---|---|
boolean |
Throws | |
---|---|
|
AfexException |
AfexException |
Registers to sim state changes with callback function.
ISimActionCallback iSimActionCallback = new ISimActionCallback.Stub() { // @Override public void onSimStateChanged(int simState) throws RemoteException { } }; try { DeviceStatusManager.getInterface(getApplicationContext()).registerSimStateAction( iSimActionCallback); } catch (AfexException e) { e.printStackTrace(); }
Parameters | |
---|---|
simActionCallback |
ISimActionCallback :
ISimActionCallback |
Returns | |
---|---|
boolean |
Throws | |
---|---|
|
AfexException |
AfexException |
Unregister Api License Listener Call this api in Activity or Service's onDestroy(Bundle)
Parameters | |
---|---|
listener |
ApiLicenseListener :
The previously added listener to remove |
Returns | |
---|---|
boolean |
Throws | |
---|---|
AfexException |