From 1ba92f1463c69cf43acffd6357c66bbc03b09c1f Mon Sep 17 00:00:00 2001 From: Swapnil Date: Wed, 1 Mar 2023 14:59:04 +0530 Subject: [PATCH 1/4] added doc --- docs/home/devicesdk.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/home/devicesdk.md b/docs/home/devicesdk.md index 2d181223..ea12f013 100644 --- a/docs/home/devicesdk.md +++ b/docs/home/devicesdk.md @@ -40,6 +40,7 @@ Table of Contents: * [Update Existing APN Config](#update-existing-apn-config) * [Install an APK from a Public Folder](#install-an-apk-from-a-public-folder) * [Power Off the Device](#power-off-the-device) + * [Set Screen Timeout](#set-screen-timeout) ## SDK Setup @@ -1491,7 +1492,7 @@ sdk.installApp(packageName, apkPath, new EsperDeviceSDK.Callback() { Use this method to power off the device. :::warning Requirements -This method is only available for Knox-supported devices & CSDK-supported devices. +This method is only available for device with Supervisor, Knox-supported devices & CSDK-supported devices. ::: **Usage** @@ -1513,4 +1514,30 @@ sdk.powerOff(new EsperDeviceSDK.Callback() { }); ``` +### Set Screen Timeout +Use this method to set the screen timeout for the device. +**Parameters** +___ +| Parameter | Data Type | Description | +|-------------|-------------------------|--------------------------------------------------------------------------------| +| time | int | One of the following:
  • FIVE_SECS
  • FIFTEEN_SECS
  • THIRTY_SECS
  • FORTY_FIVE_SECS
  • ONE_MIN
  • TWO_MIN
  • FIVE_MIN
  • TEN_MIN
  • ONE_HOUR
  • TWO_HOUR
  • NEVER
| +| ```EsperDeviceSDK.Callback``` | callback | The callback implemented once the callback succeeds. | + +**Usage** +___ + +```java +sdk.setScreenTimeOut(timeoutInMills, new EsperDeviceSDK.Callback() { + @Override + public void onResponse(@Nullable Boolean response) { + Log.d(TAG, "screen timeout to " + timeout + " is success : " + response); + showMethodResult(getString(R.string.result, "" + response)); + } + @Override + public void onFailure(Throwable t) { + Log.d(TAG, "Screen Timeout change failed", t); + showFailureResult(t); + } + }); +``` From 2a02f83f51c55c9a172bf2a9a4546df717ec9395 Mon Sep 17 00:00:00 2001 From: Swapnil Date: Wed, 1 Mar 2023 15:30:25 +0530 Subject: [PATCH 2/4] Added Constants. for SetScreenTimeout --- docs/home/devicesdk.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/home/devicesdk.md b/docs/home/devicesdk.md index ea12f013..67e76861 100644 --- a/docs/home/devicesdk.md +++ b/docs/home/devicesdk.md @@ -1492,7 +1492,7 @@ sdk.installApp(packageName, apkPath, new EsperDeviceSDK.Callback() { Use this method to power off the device. :::warning Requirements -This method is only available for device with Supervisor, Knox-supported devices & CSDK-supported devices. +This method is only available for devices with support for Knox/CSDK/Supervisor plugin. ::: **Usage** @@ -1521,7 +1521,7 @@ Use this method to set the screen timeout for the device. ___ | Parameter | Data Type | Description | |-------------|-------------------------|--------------------------------------------------------------------------------| -| time | int | One of the following:
  • FIVE_SECS
  • FIFTEEN_SECS
  • THIRTY_SECS
  • FORTY_FIVE_SECS
  • ONE_MIN
  • TWO_MIN
  • FIVE_MIN
  • TEN_MIN
  • ONE_HOUR
  • TWO_HOUR
  • NEVER
| +| timeoutInMills | int | One of the following:
  • Constants.FIVE_SECS
  • Constants.FIFTEEN_SECS
  • Constants.THIRTY_SECS
  • Constants.FORTY_FIVE_SECS
  • Constants.ONE_MIN
  • Constants.TWO_MIN
  • Constants.FIVE_MIN
  • Constants.TEN_MIN
  • Constants.ONE_HOUR
  • Constants.TWO_HOUR
  • Constants.NEVER
| | ```EsperDeviceSDK.Callback``` | callback | The callback implemented once the callback succeeds. | **Usage** From 7c93bf48fed1f2cc52321bc4c7c9e45f2e19eb86 Mon Sep 17 00:00:00 2001 From: Swapnil Date: Wed, 1 Mar 2023 15:33:13 +0530 Subject: [PATCH 3/4] Changed functionCall parameter --- docs/home/devicesdk.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/home/devicesdk.md b/docs/home/devicesdk.md index 67e76861..d55dde0b 100644 --- a/docs/home/devicesdk.md +++ b/docs/home/devicesdk.md @@ -1528,16 +1528,14 @@ ___ ___ ```java -sdk.setScreenTimeOut(timeoutInMills, new EsperDeviceSDK.Callback() { +sdk.setScreenTimeOut(Constants.TWO_MIN, new EsperDeviceSDK.Callback() { @Override public void onResponse(@Nullable Boolean response) { Log.d(TAG, "screen timeout to " + timeout + " is success : " + response); - showMethodResult(getString(R.string.result, "" + response)); } @Override public void onFailure(Throwable t) { Log.d(TAG, "Screen Timeout change failed", t); - showFailureResult(t); } }); ``` From 0eb753e3652def4674ac66381a3577dbf46e1bde Mon Sep 17 00:00:00 2001 From: Swapnil Date: Thu, 2 Mar 2023 13:55:49 +0530 Subject: [PATCH 4/4] Changed version and release name --- docs/home/devicesdk.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/home/devicesdk.md b/docs/home/devicesdk.md index d55dde0b..e9505b7c 100644 --- a/docs/home/devicesdk.md +++ b/docs/home/devicesdk.md @@ -2,9 +2,9 @@ The Esper Device SDK uses an API to conduct operations on Esper-managed devices. Use the Device SDK to develop apps that perform operations or retrieve data from your device fleet. We now use AndroidX libraries (androidx.core-core-ktx version 1.5.0 stable) as dependencies which reduces compile time. -Current version: **v2.1.7787.21** +Current version: **v2.2.3663.24** -Release name: **SUNFYRE_V8** +Release name: **SILVERWING** Table of Contents: