public class Info extends AccountManager
getDeviceInfo
registerDeviceInfoReceiverunregisterDeviceInfoReceivergetSDKVersionisSDKSupportedisPackageInstalledreadSystemProperty
| Modifier and Type | Field and Description |
|---|---|
static int |
REGISTER_CTX_NULL_CODE |
static int |
REGISTERED_EXCEPTION_CODE |
static int |
REGISTERED_SUCCESSFULLY_CODE |
static int |
UNREGISTER_CTX_NULL_CODE |
static int |
UNREGISTERED_EXCEPTION_CODE |
static int |
UNREGISTERED_SUCCESSFULLY_CODE |
ACCESS_TOKEN_INVALID, ACCESS_TOKEN_VALID, API_ACCESS_TOKEN_INVALID, API_ACCESS_TOKEN_VALID, instance, IS_USER_LOGIN_OAUTH, isPolaris, OAUTH_TOKEN_INVALID, OAUTH_TOKEN_VALID, REQUEST_AUTH_LOGIN, REQUEST_AUTH_LOGOUT, SETUP_OAUTH_ERROR, SETUP_OAUTH_SUCCESS, TOKEN_VERIFY_FAIL, TOKEN_VERIFY_SUCCESSGENERIC_ERROR, OAUTH_PATH_TOKEN, OAUTH_PATH_VERIFY| Constructor and Description |
|---|
Info() |
| Modifier and Type | Method and Description |
|---|---|
void |
bindService(android.content.Context context,
ServiceConnectionCallback callback,
java.lang.String accessToken)
This method is used to bind the service to the application.
|
org.json.JSONObject |
getDeviceInfo()
This method provides the device related information
such as the device MODEL, SERIAL, PRODUCT, DEVICE, MANUFACTURER, BOARD, BRAND, ID, and DISPLAY information in json format
If the device is registered on Eloview and was online at least once, then this method also provides details such as "parent_account", "state_province", "site_name", "device_name",
"address_line_1", "postal_code", "country", "city", "group_name".
|
java.lang.String |
getSDKVersion()
This method is used to get the current version number of the EloView Home SDK.
|
org.json.JSONObject |
getSystemCpuUsage()
This method provides information on the current CPU Usage by the system.
|
boolean |
isPackageInstalled(java.lang.String pkgName)
This method used to identify package is installed or not.
|
boolean |
isSDKSupported()
This method is used to check if the SDK is supported on the current device.
|
java.lang.String |
readSystemProperty(java.lang.String key)
This method is used to read the system property.
|
int |
registerDeviceInfoReceiver(android.content.Context ctx,
android.content.BroadcastReceiver deviceInfoReceiver)
This method is used to notify any change in device info from EloView.
|
void |
unbindService(android.content.Context context)
This method is used to unbind the service from the application.
|
int |
unregisterDeviceInfoReceiver(android.content.Context ctx,
android.content.BroadcastReceiver deviceInfoReceiver)
This method is used to unregister the EloView device info change listener.
|
configureOAuthHostedUI, destroyOAuth, getBaseUri, getClientId, getEloAccessToken, getEloOAuthToken, getEnvironment, getProperty, isPolaris, isPolarisLocked, logoutOAuth, onOAuthActivityResult, selectEnvironment, setDefaultEnvironment, setProperty, stopOAuth, unregisterAccountManagerListener, verifyEloTokenclone, getEloIntentWithFlag, getMigrate, isDevice7Inch, isDeviceM100public static final int UNREGISTERED_SUCCESSFULLY_CODE
public static final int UNREGISTER_CTX_NULL_CODE
public static final int UNREGISTERED_EXCEPTION_CODE
public static final int REGISTERED_SUCCESSFULLY_CODE
public static final int REGISTER_CTX_NULL_CODE
public static final int REGISTERED_EXCEPTION_CODE
public void bindService(android.content.Context context,
ServiceConnectionCallback callback,
java.lang.String accessToken)
context - Context in which the Network APIs were usedcallback - ServiceConnectionCallbackaccessToken - Stringpublic void unbindService(android.content.Context context)
context - Context in which the Network APIs were usedpublic boolean isPackageInstalled(java.lang.String pkgName)
pkgName - PackageNamepublic java.lang.String readSystemProperty(java.lang.String key)
key - String system property keypublic java.lang.String getSDKVersion()
public boolean isSDKSupported()
public org.json.JSONObject getDeviceInfo()
public org.json.JSONObject getSystemCpuUsage()
public int registerDeviceInfoReceiver(android.content.Context ctx,
android.content.BroadcastReceiver deviceInfoReceiver)
ctx - it must be Activity or Application contextdeviceInfoReceiver - it must be BroadcastReceiver and it will return device info
parameters in key/val pair formatpublic int unregisterDeviceInfoReceiver(android.content.Context ctx,
android.content.BroadcastReceiver deviceInfoReceiver)
ctx - it must be Activity or Application contextdeviceInfoReceiver - it must be BroadcastReceiver that is registered