public class Peripheral extends AccountManager
getEloAccessToken.setUSBPorts(Context, String, String, Handler)getUSBPorts(Context, String, Handler)getMaxUSBPort()startUsbMonitoring(Context, String, Handler)stopUsbMonitoring(Context, String, Handler)| Modifier and Type | Field and Description |
|---|---|
static int |
GET_HUB_TYPE_RESULT_CODE |
static int |
GET_USB_PORTS_RESULT_CODE
Response code to get the status of the USB ports
|
static Peripheral |
instance |
static int |
MAX_USB_PORTS |
static int |
SET_USB_PORTS_RESULT_CODE
Response code to indicate whether USB ports were set successfully or not
|
static int |
START_USB_MONITOR_RESULT_CODE
Response code provide status of the start usb monitor service.
|
static int |
STOP_USB_MONITOR_RESULT_CODE
Response code provide status of the stop usb monitor service.
|
ACCESS_TOKEN_INVALID, ACCESS_TOKEN_VALID, API_ACCESS_TOKEN_INVALID, API_ACCESS_TOKEN_VALID, IS_USER_LOGIN_OAUTH, isPolaris, KEY_SERVER_ELO_POLARIS_DEV, KEY_SERVER_PRODUCTION_POLARIS, KEY_SERVER_QA_POLARIS, KEY_SERVER_STAGING_POLARIS, OAUTH_TOKEN_INVALID, OAUTH_TOKEN_VALID, REQUEST_AUTH_LOGIN, REQUEST_AUTH_LOGOUT, SETUP_OAUTH_ERROR, SETUP_OAUTH_SUCCESS, TOKEN_VERIFY_FAIL, TOKEN_VERIFY_SUCCESSACTION_SET_EST_REQUEST, ELO_FOLDER, ELO_NETWORK_CONF_CSV_FILE, ELO_WIFI_CONFIG_FOLDER, GENERIC_ERROR, isFROM, OAUTH_PATH_TOKEN, OAUTH_PATH_VERIFY, REQUEST_TOKEN, STR_CUSTOM_ANIM_IMAGE_FILE, STR_CUSTOM_ANIM_VIDEO_FILE, STR_CUSTOM_BRAND_LOGO_FILE, STR_CUSTOM_BRAND_NAME_FILE, STR_CUSTOM_BRAND_POWERED_BY_LOGO_FILE, STR_CUSTOM_LOCALE_NAME_FILE, STR_CUSTOM_WALLPAPER, STR_ELO_PATH_FOR_CUSTOM_ANIMATION, STR_SDCARD_ELO_DIR_PATH, VERIFY_TOKEN| Constructor and Description |
|---|
Peripheral() |
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxExtUSBPort(android.content.Context ctx) |
int |
getMaxUSBPort()
This method is used to get the maximum number of USB ports on the device.
|
void |
getUSBPorts(android.content.Context context,
java.lang.String accessToken,
android.os.Handler handler)
This method is used to get status of the USB ports on the device.
|
void |
setUSBPorts(android.content.Context context,
java.lang.String accessToken,
java.lang.String json,
android.os.Handler handler)
This method is used to enable/disable the USB ports on the device.
|
void |
startUsbMonitoring(android.content.Context context,
java.lang.String accessToken,
android.os.Handler handler)
This method is used to start USB Monitoring.
|
void |
stopUsbMonitoring(android.content.Context context,
java.lang.String accessToken,
android.os.Handler handler)
This method is used to stop USB Monitoring.
|
void |
unregisterPeripheralAPIListener(android.content.Context context)
This method is used to unregister the broadcast receiver registered while using any of the Peripheral APIs.
Please make sure to call this in the "onPause" and "onDestroy" methods in your activity Lifecycle if you made use of any of the Peripheral APIs. |
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 SET_USB_PORTS_RESULT_CODE
public static final int GET_USB_PORTS_RESULT_CODE
public static final int START_USB_MONITOR_RESULT_CODE
public static final int GET_HUB_TYPE_RESULT_CODE
public static final int STOP_USB_MONITOR_RESULT_CODE
public static final int MAX_USB_PORTS
public static Peripheral instance
public void setUSBPorts(android.content.Context context,
java.lang.String accessToken,
java.lang.String json,
android.os.Handler handler)
context - A context object of the calling Class (Activity/Service).accessToken - An authentication token received from the Elo servers.json - A json string containing configuration of USB ports to be sethandler - A handler to receive one of the following callback messages:
AccountManager.TOKEN_VERIFY_FAIL
Consts.GENERIC_ERROR
SET_USB_PORTS_RESULT_CODE
public void getUSBPorts(android.content.Context context,
java.lang.String accessToken,
android.os.Handler handler)
context - ContextaccessToken - An authentication token received from the Elo servers.handler - A handler to receive one of the following callback messages:
AccountManager.TOKEN_VERIFY_FAIL
Consts.GENERIC_ERROR
GET_USB_PORTS_RESULT_CODE
public int getMaxUSBPort()
public int getMaxExtUSBPort(android.content.Context ctx)
public void startUsbMonitoring(android.content.Context context,
java.lang.String accessToken,
android.os.Handler handler)
context - A context object of the calling Class (Activity/Service).accessToken - An authentication offline tokenhandler - A handler to receive one of the following callback messages:
START_USB_MONITOR_RESULT_CODE
AccountManager.TOKEN_VERIFY_FAIL
Consts.GENERIC_ERROR
public void stopUsbMonitoring(android.content.Context context,
java.lang.String accessToken,
android.os.Handler handler)
context - A context object of the calling Class (Activity/Service).accessToken - An authentication offline tokenhandler - A handler to receive one of the following callback messages:
STOP_USB_MONITOR_RESULT_CODE
AccountManager.TOKEN_VERIFY_FAIL
Consts.GENERIC_ERROR
public void unregisterPeripheralAPIListener(android.content.Context context)
context - Context in which the system APIs were used