|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.eloview.sdk.EloSecureUtil
public class EloSecureUtil
EloSecure Utility is mainly used to call EloView SDK dependent functions like silentPackage installation , silentReboot etc.
| Field Summary | |
|---|---|
static int |
ELO_GET_DEVICE_INFO
|
static int |
OTA_APPLY_FILE_ERROR
|
static int |
OTA_APPLY_IN_PROGRESS
|
static int |
OTA_CHECK_STATUS_GENERIC_ERROR
|
static int |
OTA_CHECK_STATUS_NEW
|
static int |
OTA_CHECK_STATUS_OLD
|
static int |
OTA_CHECK_STATUS_SAME
|
static int |
OTA_DOWNLOAD_GENERIC_ERROR
|
static int |
OTA_DOWNLOAD_LOCAL_FILE_ERROR
|
static int |
OTA_DOWNLOAD_LOCAL_FILE_PERCENTAGE
|
static int |
OTA_DOWNLOAD_LOCAL_FILE_SUCCESS
|
static int |
OTA_DOWNLOAD_REMOTE_FILE_ERROR
|
static int |
OTA_DOWNLOAD_REMOTE_FILE_PERCENTAGE
|
static int |
OTA_DOWNLOAD_REMOTE_FILE_SUCCESS
|
static int |
OTA_VERIFY_FILE_ERROR
|
static int |
OTA_VERIFY_SIGN_ERROR
|
static int |
OTA_VERIFY_SIGN_PERCENTAGE
|
static int |
OTA_VERIFY_SIGN_SUCCESS
|
| Constructor Summary | |
|---|---|
EloSecureUtil()
|
|
| Method Summary | |
|---|---|
static void |
applyOTA(Context ctx,
Handler handler)
This method is used to trigger underlying Android OS OTA mechanism. |
static void |
captureScreenShot(Context ctx,
BroadcastReceiver screenshotReceiver)
This method is used to capture the screenshot from the device. |
static void |
checkOTAStatus(Context ctx,
java.lang.String buildPropUrl,
Handler handler)
This method is used to check whether pointed remote/local OTA is newer or older than current version. |
static java.lang.Long |
downloadFile(Uri uri,
java.util.Map<java.lang.String,java.lang.String> headers,
java.lang.String destination,
java.lang.String fileName,
java.lang.String contentId,
Context ctx)
|
static void |
getAddress(Context ctx,
BroadcastReceiver addressReceiver)
This method is used to get device Address |
static void |
getAECMOrientation(Context ctx,
BroadcastReceiver orientationReceiver)
This method is used to get orientation of AECM device from EloSecure application. |
static int |
getBrightness(Context ctx)
This method is used to get device Brightness the device |
static java.lang.String |
getDeviceInfo(Context ctx)
This method is used to get device information from cloud ( Sync Call ) |
static boolean |
getDeviceInfo(Context ctx,
Handler handler)
This method is used to get device information from cloud ( Async Call ) |
static int[] |
getDownloadStatus(java.lang.Long downloadId,
Context ctx)
|
static long |
getInprogressDownloadID(Context context,
java.lang.String contentName)
|
static void |
getLocale(Context ctx,
BroadcastReceiver localeReceiver)
This method is used to get device system locale |
static java.lang.String |
getSDKVersion()
This method is used to get current EloView SDK Version |
static void |
getSerialNumber(Context ctx,
BroadcastReceiver serialNumberReceiver)
This method is used to get device Serial Number |
static int |
getVolume(Context ctx)
This method is used to get device Volume the device |
static boolean |
isEloViewSDKExists(Context ctx)
Check for EloView SDK is available or not |
static boolean |
registerDeviceInfoReceiver(Context ctx,
BroadcastReceiver deviceInfoReceiver)
This method is used to notify any change in device info |
static boolean |
removecontentFromDownloadList(Context context,
long downloadId)
|
static void |
removeContentFromDownloadQueue(Context context,
java.lang.String contentName)
|
static void |
screenTurnOff(Context ctx,
int mode)
This method is used to turn off the screen |
static void |
screenTurnOn(Context ctx,
int mode)
This method is used to turn on the screen |
static void |
setBrightness(Context ctx,
int val)
This method is used to set device Brightness the device |
static void |
setDisplayOff(Context ctx,
int val)
This method is used to Set Device Display OFF |
static void |
setDisplayOn(Context ctx,
int val)
This method is used to Set Device Display ON |
static void |
setLocale(Context ctx,
java.lang.String localeStr)
This method is used to set device system locale |
static void |
setVolume(Context ctx,
int val)
This method is used to set device volume the device |
static void |
silentPackageInstall(Context ctx,
java.lang.String uri)
This method is used to install new APK silently in background |
static void |
silentPackageUninstall(Context ctx,
java.lang.String packageName)
This method is used to uninstall new APK silently in background |
static void |
silentReboot(Context ctx)
This method is used to reboot the device |
static void |
startDownloadUpgradePackage(Context context,
java.lang.String url,
Handler handler)
This method is used to download OTA file from remote http server or from local file path. |
static boolean |
unregisterDeviceInfoReceiver(Context ctx,
BroadcastReceiver deviceInfoReceiver)
This method is used to unregister the device info change listener |
static void |
unsecurePackageInstall(Context ctx,
java.lang.String uri)
This method is used to install apk using Standard Android package manager |
static void |
verifyOTA(Context ctx,
Handler handler)
This method is used to verify the system signature of downloaded OTA file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int OTA_DOWNLOAD_REMOTE_FILE_SUCCESS
public static final int OTA_DOWNLOAD_REMOTE_FILE_ERROR
public static final int OTA_DOWNLOAD_REMOTE_FILE_PERCENTAGE
public static final int OTA_DOWNLOAD_LOCAL_FILE_SUCCESS
public static final int OTA_DOWNLOAD_LOCAL_FILE_ERROR
public static final int OTA_DOWNLOAD_LOCAL_FILE_PERCENTAGE
public static final int OTA_DOWNLOAD_GENERIC_ERROR
public static final int OTA_VERIFY_SIGN_SUCCESS
public static final int OTA_VERIFY_SIGN_ERROR
public static final int OTA_VERIFY_SIGN_PERCENTAGE
public static final int OTA_VERIFY_FILE_ERROR
public static final int OTA_CHECK_STATUS_OLD
public static final int OTA_CHECK_STATUS_NEW
public static final int OTA_CHECK_STATUS_SAME
public static final int OTA_CHECK_STATUS_GENERIC_ERROR
public static final int OTA_APPLY_FILE_ERROR
public static final int OTA_APPLY_IN_PROGRESS
public static final int ELO_GET_DEVICE_INFO
| Constructor Detail |
|---|
public EloSecureUtil()
| Method Detail |
|---|
public static boolean isEloViewSDKExists(Context ctx)
ctx - A context object of the calling Class (Activity/Service).
public static java.lang.String getSDKVersion()
public static void silentPackageInstall(Context ctx,
java.lang.String uri)
ctx - A context object of the calling Class (Activity/Service).uri - A uri pointing to the apk file which needs to be installed
silently
public static void silentPackageUninstall(Context ctx,
java.lang.String packageName)
ctx - A context object of the calling Class (Activity/Service).packageName - The name of the package that needs to be uninstalledpublic static void silentReboot(Context ctx)
ctx - A context object of the calling Class (Activity/Service).
public static void captureScreenShot(Context ctx,
BroadcastReceiver screenshotReceiver)
ctx - A context object of the calling Class (Activity/Service).screenshotReceiver - BroadcastReciever object to receive the screenshot location.
public static void unsecurePackageInstall(Context ctx,
java.lang.String uri)
ctx - A context object of the calling Class (Activity/Service).uri - APK file path
public static void getAECMOrientation(Context ctx,
BroadcastReceiver orientationReceiver)
ctx - A context object of the calling Class (Activity/Service).orientationReceiver - A Receiver receives response of orientation JSON object.
public static void setBrightness(Context ctx,
int val)
val - Integer value having range from 0 - 100public static int getBrightness(Context ctx)
ctx - A context object of the calling Class (Activity/Service).brightnessReceiver - to receive brightness value
public static void setVolume(Context ctx,
int val)
ctx - A context object of the calling Class (Activity/Service).val - Integer value having range from 0 - 100public static int getVolume(Context ctx)
ctx - A context object of the calling Class (Activity/Service).
public static void getSerialNumber(Context ctx,
BroadcastReceiver serialNumberReceiver)
ctx - it must be Activity or Application contextserialNumberReceiver - to receive device Serial Number
public static void setDisplayOn(Context ctx,
int val)
ctx - it must be Activity or Application context
public static void setDisplayOff(Context ctx,
int val)
ctx - it must be Activity or Application context
public static void getAddress(Context ctx,
BroadcastReceiver addressReceiver)
ctx - it must be Activity or Application contextaddressReceiver - to receive device Address
public static void setLocale(Context ctx,
java.lang.String localeStr)
ctx - it must be Activity or Application contextlocaleStr - it must be locale string format like "ja_JP". Currently tested
locale's "en_US" , "de_DE" , "es_ES" , "fr_FR" , "it_IT" ,
"zh_CN" , "ja_JP"
public static void getLocale(Context ctx,
BroadcastReceiver localeReceiver)
ctx - it must be Activity or Application contextlocaleReceiver - return value will be locale string format like "ja_JP". Currently tested
locale's "en_US" , "de_DE" , "es_ES" , "fr_FR" , "it_IT" ,
"zh_CN" , "ja_JP"
public static boolean getDeviceInfo(Context ctx,
Handler handler)
ctx - it must be Activity or Application contexthandler - to receive device information in properties format ( key/value format )public static java.lang.String getDeviceInfo(Context ctx)
ctx - it must be Activity or Application context
public static boolean registerDeviceInfoReceiver(Context ctx,
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 format
public static boolean unregisterDeviceInfoReceiver(Context ctx,
BroadcastReceiver deviceInfoReceiver)
ctx - it must be Activity or Application contextdeviceInfoReceiver - it must be BroadcastReceiver that is registered
public static void startDownloadUpgradePackage(Context context,
java.lang.String url,
Handler handler)
ctx - A context object of the calling Class (Activity/Service).url - must be a string "http://server_url" or
"file://local_file_path"handler - handler to receive msg's about download success,error or
download percentage
public static void verifyOTA(Context ctx,
Handler handler)
ctx - A context object of the calling Class (Activity/Service).handler - handler to receive msg's about verifying the signature of downloaded OTA file,
verification percentage.
public static void applyOTA(Context ctx,
Handler handler)
ctx - A context object of the calling Class (Activity/Service).handler - handler to receive msg's about file error
public static void checkOTAStatus(Context ctx,
java.lang.String buildPropUrl,
Handler handler)
ctx - A context object of the calling Class (Activity/Service).buildPropUrl - must be a string "http://build.prop_server_url" or "file://build.prop_local_file_path"
build.prop is mandatory to check OTA version./handler - handler to receive msg's about OTA version whether it is new , old or same.
public static void screenTurnOff(Context ctx,
int mode)
ctx - it must be Activity or Application contextmode - Integer value of mode defines the source to turn on the display
Default mode value is 0
public static void screenTurnOn(Context ctx,
int mode)
ctx - it must be Activity or Application contextmode - Integer value of mode defines the source to turn on the display
Default mode value is 0
public static java.lang.Long downloadFile(Uri uri,
java.util.Map<java.lang.String,java.lang.String> headers,
java.lang.String destination,
java.lang.String fileName,
java.lang.String contentId,
Context ctx)
public static long getInprogressDownloadID(Context context,
java.lang.String contentName)
public static void removeContentFromDownloadQueue(Context context,
java.lang.String contentName)
public static boolean removecontentFromDownloadList(Context context,
long downloadId)
public static int[] getDownloadStatus(java.lang.Long downloadId,
Context ctx)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||