0% found this document useful (0 votes)
8 views80 pages

Yisheng API Development Document

The document is the API Reference Documentation for Shenzhen Yisheng Technology Co., Ltd, detailing various API functions and their usage for system information, display, installation, network, and GPIO control. It includes a revision history, usage instructions, and a comprehensive catalog of API methods. The latest version is V5.4, updated on July 28, 2023.

Uploaded by

sanxianlee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views80 pages

Yisheng API Development Document

The document is the API Reference Documentation for Shenzhen Yisheng Technology Co., Ltd, detailing various API functions and their usage for system information, display, installation, network, and GPIO control. It includes a revision history, usage instructions, and a comprehensive catalog of API methods. The latest version is V5.4, updated on July 28, 2023.

Uploaded by

sanxianlee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 80

Shenzhen Yisheng Technology Co.

, LTD

Shenzhen Yisheng Technology Co., Ltd.

The API Reference Documentation

Document number YS-API-001 Security Level I level

Author Chen Huan Last modified date 2020.05.29

Auditor Lu Jian Last approval date 2020.06.02

Approver Li Quan Last date of approval 2020.06.04


Shenzhen Yisheng Technology Co., LTD

Revised Records
Date Edition Revision note Revised

2018.06.02 V1.0-20180602 Initial version Chen Huan

1、Add the network part to obtain the Ethernet


information
2018.08.06 .0-20180V 2806 Chen Huan
2、Add the state acquisition for the automatic

synchronization network time

Add whether the backlight is turned on and get the


2018.11.22 V 2.1-20181122 Chen Huan
backlight brightness

2018.11.29 V 2.2-20181129 Increased control over dormancy time Chen Huan

2019.01.18 .0-201V 390118 Add the get CPU model Chen Huan

1、Add setting system default input method


2019.02.28 V 3.1-20190228 Chen Huan
2、Add getting system default input method

2019.05.13 V 3.2-20190513 Add setting system current default language Chen Huan

2019.06.19 V 3.3-20190619 Add getting system CPU temperature Chen Huan

1、Add the switch to turn adb on/off


2019.06.28 V 3.4-20190628 Chen Huan
2、Add the replacement boot animation

2019.07.19 V 3.5-20190719 Add setting the default Launcher Chen Huan

2020.01.13 V4.0-20200113 Add the timer switch Chen Huan

2020.02.13 V4.1-20200213 Add control over gpio index value Chen Huan

1. Add ppppoe dialing function

2020.03.30 V4.2-20200330 2. Add the function of upgrading firmware to set whether Chen Huan

or not to pop-up notification

2020.05.21 V4.3-20200521 Add the dormancy wake up method Chen Huan

2020.05.29 V5.0-20200529 Add 3288 and 3399 9.0API Chen Huan

1. Add 3288 11.0 and amlogicAPI

2. Add the automatic startup function

3. Add the daemon function


2021.07.16 V5.1-20210716 Zou Yuanhang
4. Add the installation whitelist feature

5. Add the installation blacklist function

6. Add setting the DPI method

1. Increase the acquisition of manufacture identification


2021.08.31 V5.2-20210831 Zou Yuanhang
code
Shenzhen Yisheng Technology Co., LTD

2. Increase the acquisition of the SN number

3. Add whether the status bar is hidden

4. Add the hidden display status bar

5. Add the secondary screen screenshots

6. Add get the home screen type

7. Add get the secondary screen type

8. Add the upgrade firmware and whether to delete the

firmware file

9. Increase the silent unloading

10. Add whether to set the timer switch

11. Add the shutdown

12. Add turning network ADB on and off

13. Add delete application installation whitelist

14, Add delete application installation blacklist

2021.10.28 V5.3-2021028 Integration of the yfaceapi Zou Yuanhang

2023.07.28 V5.4-20230728 Organize the interfaces and documentations Chen Jinhua


Shenzhen Yisheng Technology Co., LTD

Catalogue
Revised Records ................................................................................................................................... 2

Chapter 1 How to use the API in the Android Studio ......................................................................8

1. Initialize instance ....................................................................................................................... 9

2. Bind AIDL service .....................................................................................................................9

3. Set AIDL callback ................................................................................................................... 10

Chapter 2 Get system information ................................................................................................... 11

2.1 Get API version-date information ..........................................................................................11

2.2 Get the model number of the device ......................................................................................11

2.3 Get the system version of the device ..................................................................................... 12

2.4 Get the device memory capacity ............................................................................................13

2.5 Get the device storage capacity ............................................................................................. 13

2.6 Get the device firmware version ............................................................................................ 14

2.7 Get the device firmware kernel version ................................................................................. 15

2.8 Get the device firmware version and compilation date ......................................................... 15

2.9 Get the firmware compilation time ........................................................................................16

2.10 Get the device CPU model ...................................................................................................17

2.11 Get the vendor identification code .......................................................................................17

2.12 Get the SN number .............................................................................................................. 18

Chapter 3 Shutdown and Reboot ..................................................................................................... 19

3.1 Shutdown ............................................................................................................................... 19

3.2 Restart .................................................................................................................................... 19

Chapter 4 Display .............................................................................................................................. 21

4.1 Screenshot save ......................................................................................................................21

4.2 Set the screen rotation angle .................................................................................................. 21

4.3 Get screen wide pixels (this interface has been removed after V5.2) ....................................22

4.4 Get screen high pixels (this interface has been removed after V5.2) .................................... 23

4.5 Navigation bar status setting ..................................................................................................24


Shenzhen Yisheng Technology Co., LTD

4.6 Query the navigation bar status ............................................................................................. 24

4.7 Set slide-out navigation bar on or off .................................................................................... 25

4.8 Query whether the slide-out navigation bar is turned on .......................................................26

4.9 Set the slide-out notification bar on or off .............................................................................27

4.10 Query slide-out notification bar status .................................................................................27

4.11 Status bar status setting ........................................................................................................28

4.12 Query the state of the status bar ...........................................................................................29

4.13 Turn off the backlight .......................................................................................................... 30

4.14 Turn on the backlight ...........................................................................................................30

4.15 Get whether the backlight is turned on ................................................................................ 30

4.16 Set the screen brightness

4.17 Get the backlight brightness value .......................................................................................32

4.18 Turn off the HDMI output ................................................................................................... 32

4.19 Turn on the HDMI output ....................................................................................................33

4.20 Secondary screen screenshot ............................................................................................... 33

4.21 Main Screen type ................................................................................................................. 34

4.22 Secondary screen type ......................................................................................................... 35

4.23 Get the DPI .......................................................................................................................... 35

4.24 Set the Dpi ........................................................................................................................... 36

Chapter 5 Installation and upgrade ................................................................................................. 38

5.1 Firmware upgrade .................................................................................................................. 38

5.2 Recovery ................................................................................................................................ 38

5.3 Silent installation of APK ...................................................................................................... 39

5.4 Set whether the upgrade firmware pops up ........................................................................... 40

5.5 Whether to delete the firmware package from the file after setting the firmware upgrade ... 41

5.6 Silent uninstall Apk ............................................................................................................... 42

Chapter 6 Network ............................................................................................................................ 43

6.1 Get the device network mode 43


Shenzhen Yisheng Technology Co., LTD

6.2 Query the Ethernet MAC address ..........................................................................................43

6.3 Query the Ethernet connection mode .....................................................................................44

6.4 Query the Ethernet switch status ........................................................................................... 45

6.5 Query the subnet mask of the Ethernet ..................................................................................45

6.6 Query the gateway of Ethernet .............................................................................................. 46

6.7 Query Dns 1 of the Ethernet .................................................................................................. 46

6.8 Query Dns 2 of the Ethernet .................................................................................................. 47

6.9 Set Ethernet to dynamic acquisition mode ............................................................................ 48

6.10 Set Ethernet to static acquisition mode ................................................................................48

6.11 Get the Ethernet dynamic IP address ...................................................................................49

6.12 Get the static IP address of the Ethernet .............................................................................. 50

6.12 Control the Ethernet switch ................................................................................................. 51

6.14 ppoe dial-up (this interface has been removed after V5.2) ..................................................51

Chapter 7 Storage .............................................................................................................................. 53

7.1 Query the external storage SD card path ............................................................................... 53

7.2 Query the external storage U disk path ..................................................................................53

7.3 Query the port absolute path ..................................................................................................54

Chapter 8 Timer switch .....................................................................................................................56

8.1 Set the timer switch of weekly mode .....................................................................................56

8.2 Set a set of timer switches ......................................................................................................57

8.3 Get the current timer switch mode of the device ................................................................... 58

8.4 Get the startup time of the device's current timer switch .......................................................58

8.5 Get the shutdown time of the current timing switch machine ............................................... 59

8.6 Get the last power on time of the device's timer switch ........................................................ 60

8.7 Get the last shutdown time of the device's timer switch ........................................................60

8.8 Clear the timer switch data .................................................................................................... 61

8.9 Get the timer switch version .................................................................................................. 61

8.10 Get whether the equipment has set the timer switch ........................................................... 62
Shenzhen Yisheng Technology Co., LTD

Chapter 9 GPIO index value control ............................................................................................... 63

9.1 Set the state of the io port to input or output ......................................................................... 63

9.2 Get whether the current gpie is an input port or an output port .............................................63

9.3 Set the level of the gpio ......................................................................................................... 64

9.4 Get the level of the current gpio ............................................................................................ 65

Chapter 10 Other ............................................................................................................................... 66

10.1 Set and save the system time ............................................................................................... 66

10.2 Turn automatic time determination on or off .......................................................................67

10.3 Control whether the soft keyboard can pop up .................................................................... 67

10.4 Control of dormancy time ....................................................................................................68

10.5 Query automatically determine network time status ........................................................... 69

10.6 Execute shell commands with ROOT authority .................................................................. 69

10.7 Get the HDMI output status .................................................................................................70

10.8 Set default input method ...................................................................................................... 71

10.9 Get default input method ..................................................................................................... 71

10.10 Set system language ...........................................................................................................72

10.11 Get device CPU temperature ............................................................................................. 73

10.12 Turn the adb connection on or off ..................................................................................... 73

10.13 Replace boot animation ..................................................................................................... 74

10.14 Set default Launcher .......................................................................................................... 75

10.15 Execute shutdown operation (repeat, remove) .................................................................. 75

10.16 Set start-up ......................................................................................................................... 76

10.17 Set daemon application ......................................................................................................76

10.18 Set whether to enable the application installation whitelist and add the app to the list .....77

10.19 Set whether to enable the application installation blacklist and add the app to the list .....78

10.20 Turn the network adb connection on or off ....................................................................... 79


Shenzhen Yisheng Technology Co., LTD

Chapter 1 How to use the API in the Android


Studio

(1) Copy “ysapi.jar” to [engineering directory \ app \ libs \]

(2) Right click on jar file in “libs” folder select “add as Library...”, then select “Model”, which can
also be imported successfully

Web :www.yishengtec.cn
8
Shenzhen Yisheng Technology Co., LTD

Note: All API calls

(1.) API version V5.3-20211028 started in order to realize platform unification


and change all API calls to AIDL mode, AIDL establishes the service connection at the
ms level and returns the IBinder implementation directly with the server method, so
the call method once when the program starts running. When the registered component
is destroyed, pay attention to cancel the registration, call the method
mMyManager.unBindAIDLService (This); suggest that the initialization interface can
be executed in the onCreate() of Application or Activity;
(2.) All API interfaces are called according to the description of this document.
If the method in the API is compatible with the old version of API, the call in the
current version is invalid;

Call method:

1, Initialize instance

MyManager mMyManager = MyManager.getInstance(this);

2. Bind AIDL service

mMyManager.bindAIDLService(this);

Web :www.yishengtec.cn
9
Shenzhen Yisheng Technology Co., LTD

3. Set AIDL callback

mMyManager.setConnectClickInterface(new MyManager.ServiceConnectedInterface()
{
@Override

public void onConnect() {

/ / The callback is successful, and the interface can be called normally

/ / For Example: mMyManager.getApiVersion();

});

Web :www.yishengtec.cn
10
Shenzhen Yisheng Technology Co., LTD

Chapter 2 Get system information


2.1 Get API version-date information
Function: public String getApiVersion ()
Description: get the current API version-date information
The API version of interface: V1.0-20180602
/**
* @method getApiVersion()
* @description get the current API-version-date information, if the API is modified, you need to modify here
* @date 20180602
* @author sky
* @return version information of the current API
*/
Parameter name /
Type Description Example
Return value
Returned value String Version-date V1.0-20180602

Example:
My Manager manager = MyManager.getInstance(this);
Log.d(TAG,"API Version = " + manager.getApiVersion());
/ / Output APIINFO: API Version = V1.0-20180602

2.2 Get the model number of the device


Function: public String getAndroidModle()
Description: get the model number of the current device
The API version of this interface: V1.0-20180602
/**
* @method getAndroidModle()
* @description get the current device model, such as rk3288, rk3399
* @date 20180602
* @author sky
* @return device model number
*/
Web :www.yishengtec.cn
11
Shenzhen Yisheng Technology Co., LTD

Parameter name /
Type Description Example
Return value

Returned value String Model-device Mstar Android TV

Example:
MyManager manager = MyManager.getInstance(this);
Toast.makeText(getApplicationContext(),"Model"+manager.getAndroidModle(),Toast.LENGTH_SHORT).show()
;
/ / Output Model= rk3288

2.3 Get the system version of the device


Function: public String getAndroidVersion()
Description: get the android system version of the current device
The API version of this interface: V1.0-20180602
/**
* @method getAndroidVersion()
* @description get the android system version of the current device, such as 7.1 returns 25
* @date 20180602
* @author sky
* @return android system version
*/

Parameter name /
Type Description Example
Return value

Returned value String Android version 19

Example:
MyManager manager = MyManager.getInstance(this);
Toast.makeText(getApplicationContext(),"Version="+manager.getAndroidVersion(),Toast.LENGTH_SHORT).sh
ow();
// output Version=19

Web :www.yishengtec.cn
12
Shenzhen Yisheng Technology Co., LTD

2.4 Get the device memory capacity


Function: public String getRunningMemory()
Description: get the hardware memory capacity of the device.
The API version of this interface: V1.0-20180602
/**
* @method getRunningMemory()
* @description get the hardware memory capacity of the device
* @date 20180602
* @author sky
* @return memory capacity
*/

Parameter name /
Type Description Example
Return value

Returned value String Hardware memory capacity in GB 2GB

Example:
MyManager manager = MyManager.getInstance(this);
Toast.makeText(getApplicationContext(),"RunningMemory"+manager.getRunningMemory(),Toast.LENGTH_SH
ORT).show();
/ / Output of RunningMemory2GB

2.5 Get the device storage capacity


Function: public String getInternalStorageMemory ()
Description: get the hardware internal storage capacity of the device
The API version of this interface: V1.0-20180602
/**
* @method getInternalStorageMemory()
* @description get the storage capacity of the device
* @date 20180602
* @author sky
* @return internal storage capacity of the device
*/

Web :www.yishengtec.cn
13
Shenzhen Yisheng Technology Co., LTD

public String getInternalStorageMemory();

Parameter name /
Type Description Example
Return value

Returned value String Hardware internal storage capacity in GB 16GB

Example:
MyManager manager = MyManager.getInstance(this);
Toast.makeText(getApplicationContext(),"InternalStorageMemory:"+manager.getInternalStorageMemory
(),Toast.LENGTH_SHORT).show();
/ / Output InternalStorageMemory: 16GB

2.6 Get the device firmware version


Function: public String getFirmwareVersion()
Description: get the firmware SDK version of the device.
The API version of this interface: V1.0-20180602
/**
* @method getFirmwareVersion()
* @description get the firmware SDK version of the device.
* @date 20180602
* @author sky
* @return device SDK version
*/

Parameter name
Type Description Example
/ Return value

Returned value String Firmware version of the device 1.0

Example:
MyManager manager = MyManager.getInstance(this);
Toast.makeText(getApplicationContext(),"FW:"+manager.getFirmwareVersion(),Toast.LENGTH_SHORT).show()
;

Web :www.yishengtec.cn
14
Shenzhen Yisheng Technology Co., LTD

// output FW:1.0

2.7 Get the device firmware kernel version


Function: public String getKernelVersion()
Description: get the firmware kernel version of the device
The API version of this interface: V1.0-20180802
/**
* @method getKernelVersion()
* @description get the firmware kernel version of the device
* @date 20180802
* @author sky
* @return kernel version
*/

Parameter name /
Type Description Example
Return value

Returned value String Firmware kernel version of the device 3.10.86

Example:
MyManager manager = MyManager.getInstance(this);
Log.e("SW kernel Version=” manager.getKernelVersion());
/ / Output SW kernel Version =3.10.86

2.8 Get the device firmware version and compilation date


Function: public String getAndroidDisplay()
Description: get the device firmware version and compilation date
The API version of this interface: V1.0-20180602

/**
* @method getAndroidDisplay()
* @description get the firmware version number
* @date 20180602
Web :www.yishengtec.cn
15
Shenzhen Yisheng Technology Co., LTD

* @author sky
* @return firmware version number of the device
*/

Parameter name /
Type Description Example
Return value

returned value String Device firmware version and compilation date

Example:
MyManager manager = MyManager.getInstance(this);
Log.e("SWAndroidDisplay=” manager.getAndroidDisplay ());
/ / Output SW AndroidDisplay = aosp _ almond _ dtmb-userdebug 6.0 MRA58K eng.ace.20180523.103817
test-keys

2.9 Get the firmware compilation time


Function: public String getFirmwareDate()
Description: get the firmware compilation time
The API version of this interface: V1.0-20180602
/**
* @method getFirmwareDate()
* @description the firmware compilation time
* @date 20180602
* @author sky
* @return firmware compilation time, such as 20180602
*/

Parameter name /
Type Description Example
Return value

Returned value String Firmware compilation time of the device 20180602

Example:
MyManager manager = MyManager.getInstance(this);
Log. And d ("API display", "getFirmwareDate():" + manager.getFirmwareDate());
/ / Output API display:: getFirmwareDate(): 20180602
Web :www.yishengtec.cn
16
Shenzhen Yisheng Technology Co., LTD

2.10 Get the device CPU model


Function: public String get CPUType ()
Description: get the device CPU model
The API version of this interface: V 390118.0-201
/**
* @method getCPUType()
* @description get the device CPU model
* @date 20190118
* @author sky
* @return device CPU model
*/

Parameter name /
Type Description Example
Return value

Returned value String Device CPU model

Example:
MyManager manager = MyManager.getInstance(this);
Log. D ("API display", "Device CPU Model:" + manager.getCPUType());

2.11 Get the vendor identification code


Function: public String getVendorID()
Description: get the vendor identification code
The API version of this interface: V 180602.0-201
/**
* @method getVendorID()
* @description get the vendor identification code
* @date 20180602
* @author sky
* @return get the vendor identification code
*/

Web :www.yishengtec.cn
17
Shenzhen Yisheng Technology Co., LTD

Parameter name /
Type Description Example
Return value

Returned value String Returns the vendor ID YSTA6212

Example:
MyManager manager = MyManager.getInstance(this);
ToastUtils.showToast (This, "Vendor identifier =" + manager.getVendorID());

2.12 Get the SN number


Function: public String getSn()
Description: get the SN number
The API version of this interface: V1.0-20180602
/**
* @method getSn()
* @description get the SN number
* @date 20180602
* @author sky
* @param
*/

Parameter name /
Type Description Example
Return value

Returned value String SN number 2CE4WW1BKN

Note:

Example:
MyManager manager = MyManager.getInstance(this);
ToastUtils.showToast(this, "sn=" + manager.getSn());

Web :www.yishengtec.cn
18
Shenzhen Yisheng Technology Co., LTD

Chapter 3 Shutdown and Reboot


3.1 Shutdown
Function: public void shutdown()
Description: Shutdown
The API version of this interface: V1.0-20180602
/**
* @method shutdown()
* @description execute the shutdown operation and follow the Android standard shutdown process
* @date 20180602
* @author sky
*/

Parameter name Type Description Example

/ return value
Returned value void

Example:
MyManager manager = MyManager.getInstance(this);
manager.shutdown();

3.2 Restart
Function: public void reboot()
Description: restart
The API version of this interface: V1.0-20180602
/**
* @method reboot()
* @description execute the restart operation and follow the Android standard restart process
* @date 20180602
* @author sky
*/

Web :www.yishengtec.cn
19
Shenzhen Yisheng Technology Co., LTD

Parameter name Type Description Example

/ return value
Returned value void

Example:
MyManager manager = MyManager.getInstance(this);
manager.reboot();

Web :www.yishengtec.cn
20
Shenzhen Yisheng Technology Co., LTD

Chapter 4 Display
4.1 Screenshot save
Function: public boolean takeScreenshot (String path)
Description: capture the current full screen as an image and rename it to the corresponding path
The API version of this interface: V1.0-20180602
/**
* @method takeScreenshot
* @description screenshot, execute this method to save the current screenshot of the system in the specified path
* @date 20180602
* @author sky
* @param path, the path to save the image. Such as, the / mnt/internal_sd/001.jpg
* @return whether the screenshot is successful, True is successful, False is failed
*
*/

Parameter name Type Description Example

/ return value
Parameter name String Save the absolute path “/mnt/internal_sd/001.jpg”

True-successful saved screenshot


Returned value Boolean Is the screenshot successful
False-failed

Note: whether the path is a read -write directory including filename.

Example:
/ / Screen capture and save to "/ mnt/internal_sd/001.jpg"
MyManager manager = MyManager.getInstance(this);
manager.takeScreenshot(Environment.getExternalStorageDirectory().getPath() +"/001.jpg");

4.2 Set the screen rotation angle


Function: public boolean rotateScreen (Context context, String degree)
Description: set the screen to rotate clockwise N angle
The API version of this interface: V1.0-20180602
/**
Web :www.yishengtec.cn
21
Shenzhen Yisheng Technology Co., LTD

* @method rotateScreen(Context context, String degree)


* @description rotate screen orientation, 0, 90, 180, and 270 degrees
* @date 20180602
* @author sky
* @param context context object. degree, angle of rotation (0 / 90 / 180 / 270)
*/

Parameter name Type Description Example

/ Return value

"0"

"90"
Degree String Only support 0, 90, 180, 270 four angles
"180"

"270"

The return value of this interface has no


Returned value Boolean
reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.rotateScreen(context,"90");

4.3 Get screen wide pixels (this interface has been removed after V5.2)
Function: public int getDisplayWidth (Context context)
Description: get the display resolution wide X pixels.
The API version of this interface: V1.0-20180602
/**
* @method getDisplayWidth(Context context)
* @description get the screen width
* @date 20180602
* @author sky
* @param context, context object
* @return screen width
*/
Web :www.yishengtec.cn
22
Shenzhen Yisheng Technology Co., LTD

public int getDisplayWidth(Context context)

Parameter name /
Type Description Example
Return value

Parameter name Context Context object

Screen actual wide pixels


Returned value Int

Example:
MyManager manager = MyManager.getInstance(this);
manager.getDisplayWidth(context);

4.4 Get screen high pixels (this interface has been removed after V5.2)
Function: public int getScreenHeight()
Description: get display resolution high Y pixels
The API version of this interface: V1.0-20180602
/**
* @method getDisplayHeight(Context context)
* @description get the screen height
* @date 20180602
* @author sky
* @param context, context object
* @return screen height
*/

Parameter name /
Type Description Example
Return value

Parameter name Context Context object

Returned value Int Actual screen width pixels

Example:
/ / Get the resolution at a 1080p screen
MyManager manager = MyManager.getInstance(this);

Web :www.yishengtec.cn
23
Shenzhen Yisheng Technology Co., LTD

int x = manager.getDisplayWidth(context);
int y = manager.getDisplayHeight(context);
Log. And d ("API display:", "Width =" + x + "Height =" + y);
/ / Will output the Width: Height= 1920:1080

4.5 Navigation bar status setting


Function: public boolean hideNavBar (boolean hide)
Description:display or hide the navigation bar
The API version of this interface: V1.0-20180602

/**
* @method hideNavBar(boolean hide)
* @description set the display or hide the navigation
* @date 20180602
* @author sky
* @param hide pass True to hide the navigation bar and False to display.
*/
Parameter name /
Type Description Example
Return value

True-hide the navigation bar


Parameter name Boolean
False-display the navigation bar

The return value of this interface has no


Returned value Boolean
reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.hideNavBar (true); / / How to hide the navigation bar

4.6 Query the navigation bar status


Function: public boolean getNavBarHideState()
Description: whether the navigation bar is hidden
The API version of this interface: V1.0-20180602

Web :www.yishengtec.cn
24
Shenzhen Yisheng Technology Co., LTD

/**
* @method getNavBarHideState()
* @description get the state of the navigation bar
* @date 20180602
* @author sky
* @return navigation bar hide returns True, and display returns False
*/
Parameter name /
Type Description Example
Return value

True-hidden
Returned value Boolean
False-display

Example:
MyManager manager = MyManager.getInstance(this);
if(manager.getNavBarHideState()){
Log.e("StatusBar hide.”);
}else{
Log.e("StatusBar show.”);
}

4.7 Set slide-out navigation bar on or off


Function: public boolean setSlideShowNavBar (boolean flag)
Description: turn on or off slide-out navigation bar
The API version of this interface: V1.0-20180602
/**
* @method setSlideShowNavBar(boolean flag)
* @description turn the slide-out navigation bar on or off
* @date 20180602
* @author sky
* @param flag turn on the slide-out navigation bar returns True, and turn off it returns False
*/
Parameter name / Type Description Example

Web :www.yishengtec.cn
25
Shenzhen Yisheng Technology Co., LTD

Return value

True-turn on the slide-out status bar


Parameter name Boolean
False-turn off the slide-out status bar

The return value of this interface has no


Returned value Boolean
reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.setSlideShowNavBar (true); / / Turn on the slide-out navigation bar

4.8 Query whether the slide-out navigation bar is turned on


Function: public boolean isSlideShowNavBarOpen
Description: whether the slide-out navigation bar is turned on
The API version of this interface: V1.0-20180602
/**
* @method isSlideShowNavBarOpen()
* @description query whether the slide-out navigation bar is turned on
* @date 20180602
* @author sky
* @return turn on the slide-out navigation bar returns True, turn off it returns False
*/

Parameter name /
Type Description Example
Return value

True-on
Returned value Boolean
False-off

Example:
MyManager manager = MyManager.getInstance(this);
if(manager.isSlideShowNavBarOpen){
Log.e("SlideShowNavBar open.”);
}else{
Log.e("SlideShowNavBar close”);

Web :www.yishengtec.cn
26
Shenzhen Yisheng Technology Co., LTD

4.9 Set the slide-out notification bar on or off


Function: public boolean setSlideShowNotificationBar (boolean enable)
Description: turn on or off the slide-out notification bar
The API version of this interface: V1.0-20180602
/**
* @method setSlideShowNotificationBar(boolean flag)
* @description set the slide-out notification bar on or off
* @date 20180602
* @author sky
* @param flag turn on the drop-down notification bar, pass True, disable the drop-down notification bar, pass
False
*/
Parameter name /
Type Description Example
Return value

True-turn on the slide out status bar


Parameter name Boolean
False-turn off the slide out status bar

The return value of this interface has no


Returned value Boolean
reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.setSlideShowNavBar (true); / / Turn on the drop-down notification bar

4.10 Query slide-out notification bar status


Function: public boolean isSlideShowNotificationBarOpen ()
Description: whether the slide-out notification bar is turned on
The API version of this interface: V1.0-20180602
/**
* @method isSlideShowNotificationBarOpen()
* @description query whether the drop-down notification bar is turned on
* @date 20180602
Web :www.yishengtec.cn
27
Shenzhen Yisheng Technology Co., LTD

* @author sky
* @return turn on the drop-down notification bar returns True, otherwise return False

*/
Parameter name /
Type Description Example
Return value
True-on
Returned value Boolean
False-off

Example:
MyManager manager = MyManager.getInstance(this);
if(manager.isSlideShowNavBarOpen){
Log.e("SlideShowNavBar open.”);
}else{
Log.e("SlideShowNavBar close”);
}

4.11 Status bar status setting


Function: public boolean hideStatusBar (boolean hide)
Description: display or hide the status bar
The API version of this interface: V1.0-20180602

/**
* @method hideStatusBar(boolean hide)
* @description set the display or hide the status bar
* @date 2021/1/12
* @author sky
* @param hide Hidden the status bar to pass False and display it to pass True
*/
Parameter name /
Type Description Example
Return value

True-hidden status bar


Parameter name Boolean
False-display the status bar

Web :www.yishengtec.cn
28
Shenzhen Yisheng Technology Co., LTD

The return value of this interface has no


Returned value Boolean
reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.hideStatusBar (false); / / hidden status bar

4.12 Query the state of the status bar


Function: public boolean getStatusBar()
Description: whether the status bar is hidden
The API version to implement this interface: 2021 / 1 / 12
/**
* @method getStatusBar()
* @description get the state of the status bar
* @date 20180602
* @author sky
* @return the status bar hide returns True, and the display returns False
*/

Parameter name /
Type Description Example
Return value

True-hidden
Returned value Boolean
False-display

Example:
MyManager manager = MyManager.getInstance(this);
if(manager.getStatusBar()){
Log.e("StatusBar hide.”);
}else{
Log.e("StatusBar show.”);
}

Web :www.yishengtec.cn
29
Shenzhen Yisheng Technology Co., LTD

4.13 Turn off the backlight


Function: public boolean turnOffBacklight()
Description: turn off the screen, only turn off the backlight, but not into the dormancy, the software continues
to run.
The API version of this interface: V1.0-20180602
/**
* @method turnOffBackLight()
* @description turn off the screen backlight, just turn off the backlight, and other system functions as usual
* @date 20180602
* @author sky
*/

Example:
MyManager manager = MyManager.getInstance(this);
manager.turnOffBacklight();

4.14 Turn on the backlight


Function: public boolean turnOnBacklight()
Description: turn on the backlight.
The API version of this interface: V1.0-20180602
/**
* @method turnOnBackLight()
* @description turn on the screen backlight, corresponding to the turnOffBackLight() method
* @date 20180602
* @author sky
*/

Example:
manager.turnOnBacklight();

4.15 Get whether the backlight is turned on


Function: public boolean isBacklightOn()
Description: whether the backlight is turned on.

Web :www.yishengtec.cn
30
Shenzhen Yisheng Technology Co., LTD

The API version of this interface: V2.1-20181122


/**
* @method isBacklightOn()
* @description whether the backlight is turned on
* @date 20181122
* @author sky
* @return the current backlight is turned on returns True, otherwise return False
*/
Parameter name /
Type Description Example
Return value

True-backlight on
Returned value Boolean
False-backlight off

Example:
MyManager manager = MyManager.getInstance(this);
manager.isBacklightOn();

4.16 Set the screen brightness


Function: public boolean changeScreenLight (int value)
Description: adjust the screen brightness
The API version of this interface: V1.0-20180828
/**
* @method changeScreenLight(int value)
* @description set the screen brightness
* @date 20180828
* @author sky
* @param value, it is set from 1 to 100, setting 100 represents the maximum brightness and 1 represents the
minimum brightness
*/
Parameter name /
Type Description Example
Return value

Parameter name Int Specific value of brightness (1-100) 50

Web :www.yishengtec.cn
31
Shenzhen Yisheng Technology Co., LTD

The return value of this interface has no


Returned value Boolean
reference value

Note: The parameter values are set from 1 to 100, setting 100 represents the maximum brightness and 1
represents the minimum brightness
Example: manager.changeScreenLight(50);

4.17 Get the backlight brightness value


Function: public int getSystemBrightness()
Description: get the backlight brightness value
The API version of this interface: V2.1-20181122
/**
* @method getSystemBrightness()
* @description get the current device backlight brightness
* @date 20181122
* @author sky
* @return int, the returned brightness range is 0-100
*/
Parameter name /
Type Description Example
Return value

Returned value Int The range of brightness is from 0 to 100

Example:
MyManager manager = MyManager.getInstance(this);
manager.getSystemBrightness();

4.18 Turn off the HDMI output


Function: public boolean turnOffHDMI()
Description: turn off the HDMI output
The API version of this interface: V1.0-20180602

Web :www.yishengtec.cn
32
Shenzhen Yisheng Technology Co., LTD

/**
* @method turnOffHDMI()
* @description turn off the HDMI output, only turn off the signal output, and other system functions are not
affected
* @date 20180602
* @author sky
*/

Example:
MyManager manager = MyManager.getInstance(this);
manager.turnOffHDMI();

4.19 Turn on the HDMI output


Function: public boolean turnOnHDMI()
Description: turn on the HDMI output
The API version of this interface: V1.0-20180602
/**
* @method turnOnHDMI()
* @description turn on the HDMI output, corresponding to the turnOffHDMI()
* @date 20180602
* @author sky
*/

Example:
MyManager manager = MyManager.getInstance(this);
manager.turnOnHDMI();

4.20 Secondary screen screenshot


Function: public boolean viceScreenshot (String path)
Description: capture the current full screen as an image and rename it to the corresponding path
The API version of this interface: V1.0-20180602

/**
* @method viceScreenshot

Web :www.yishengtec.cn
33
Shenzhen Yisheng Technology Co., LTD

* @description screenshot, execute this method to save the current screenshot of the system in the specified path
* @date 20180602
* @author sky
* @param path, the path to save the image. Such as, the / mnt/internal_sd/001.jpg
* @return whether the screenshot is successful, True successful, False failed
*
*/

Parameter name
Type Description Example
/ Return value
Parameter name String Save the absolute path “/mnt/internal_sd/001.jpg”

Returned value Boolean Is the screenshot successful True-successful, False-failed

Note: whether path is read-write directory including the filename.

Example:
/ / Screen capture and save to "/ mnt/internal_sd/001.jpg"
MyManager manager = MyManager.getInstance(this);
manager.viceScreenshot(Environment.getExternalStorageDirectory().getPath() +"/001.jpg");

4.21 Main Screen type


Function: public String getHomeScreenType()
Description: main screen type
The API version of this interface: 2021 / 1 / 12
/**
* @method getHomeScreenType()
* @description main screen type
* @date 20180602
* @author sky
* @return main screen type
*/

Parameter name / Type Description Example

Web :www.yishengtec.cn
34
Shenzhen Yisheng Technology Co., LTD

Return value

Returned value String Home screen type HDMI

Example:
MyManager manager = MyManager.getInstance(this);
ToastUtils.showToast (This, "Main screen type is:" + manager.getHomeScreenType());

4.22 Secondary screen type


Function: public String getSecondaryScreenType()
Description: secondary screen type
The API version of this interface: 2021 / 1 / 12
/**
* @method getSecondaryScreenType()
* @description secondary screen type
* @date 20180602
* @author sky
* @return secondary screen type
*/

Parameter name /
Type Description Example
Return value

Returned value String Secondary screen type HDMI

Example:
MyManager manager = MyManager.getInstance(this);
ToastUtils.showToast (This, "secondary screen type is:" + manager.getSecondaryScreenType());

4.23 Get the DPI


Function: public String getDpi()
Description: get the DPI
The API version of this interface: V5.1-20210716

Web :www.yishengtec.cn
35
Shenzhen Yisheng Technology Co., LTD

/**
* @param * @param
* @return return the dpi
* @method getDpi
* @description get the DPI
* @date: 2021/1/12
* @author: zouyuanhang
*/
Parameter name /
Type Description Example
Return value

Parameter String Return the current DPI 160

Example:
MyManager manager = MyManager.getInstance(this);
manager.getDpi();

4.24 Set the Dpi


Function: public boolean setDpi (int value)
Description: set the Dpi
The API version of this interface: V5.1-20210716
/**
* @param * @param value 0=160 ,1=240,2=360,4=480
* @return
* @method setDpi
* @description set the Dpi
* @date: 2021/1/12
* @author: zouyuanhang
*/
Parameter name /
Type Description Example
Return value

Input dpi values: 0=160,1=240,2=360,


Parameter Int 0
3=480

Web :www.yishengtec.cn
36
Shenzhen Yisheng Technology Co., LTD

The return value of this interface has no


Returned value Boolean
reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.setDpi(0);

Web :www.yishengtec.cn
37
Shenzhen Yisheng Technology Co., LTD

Chapter 5 Installation and upgrade


5.1 Firmware upgrade

Function: public boolean upgradeSystem (String absolutePath)


Description: upgrade the firmware
The API version of this interface: V1.0-20180602
/**
* @method upgradeSystem(String absolutePath)
* @description upgrade the firmware
* @date 20180602
* @author sky
* @param absolutePath, the absolute path where the firmware to be upgraded is stored
*/
Parameter name /
Type Description Example
Return value

Parameter name String Absolute path where firmware is stored /mnt/internal_sd/update.zip

The return value of this interface has no


Returned value Boolean
reference value

Note:
1. The function will automatically restart the system for the “update.zip” upgrade.
2. Ensure that the “zip” files exist and are fully available.
3. The filename must be a “update.img or “updat.zip”。

Example:
MyManager manager = MyManager.getInstance(this);
manager.upgradeSystem(“/mnt/internal_sd/update.zip ”);

5.2 Recovery
Function: public boolean rebootRecovery()
Description: will restart into recovery mode

Web :www.yishengtec.cn
38
Shenzhen Yisheng Technology Co., LTD

The API version of this interface: V1.0-20180602

/**
* @method rebootRecovery()
* @description restore factory settings
* @date 20180602
* @author sky
*/

Example:
MyManager manager = MyManager.getInstance(this);
manager.rebootRecovery();

5.3 Silent installation of APK


Function: public boolean silentInstallApk (String apkPath, boolean isStartApk)
Description: silent installation of APK.
The API version of this interface: V1.0-20180602
/**
* @method silentInstallApk(String apkPath)
* @description silent installation of APK, the method is pm install-r
* @date 20180602
* @author sky
* @param apkPath, absolute path of the apk to be installed
* @param isStartApk whether to turn on the app after successful installation
* @return silent installation successfully returns True, otherwise return False
*/

Parameter name /
Type Description Example
Return value

Absolute path of the APK to be


Parameter name String "/mnt/internal_sd/test.apk"
installed

Web :www.yishengtec.cn
39
Shenzhen Yisheng Technology Co., LTD

True: start the app after


Whether to turn on the app after the
Parameter name Boolean successful installation, False: do
successful silent installation
not start
Whether the silent installation was
successful or not
Note: because the installation is
Returned value Boolean
executed asynchronously, the return
value of this interface has no reference
value

Note:
The APK files exist and are fully available.

Example:
/ / Install the test.apk
MyManager manager = MyManager.getInstance(this);
boolean success = manager.silentInstallApk("/mnt/usb/0000-0000/YiShengTest.apk",false);
/ / Silent installation YiShentTest. Apk, do not turn on the apk after the successful installation

5.4 Set whether the upgrade firmware pops up


Function: public boolean setUpdateSystemWithDialog (boolean flag)
Description: set whether the upgrade firmware pops up
The API version of this interface: V4.2-20200330
/**
* @method setUpdateSystemWithDialog(boolean flag)
* @description set whether the upgrade firmware pops up, the default is no pop up
* @date 20200330
* @author sky
* @param flag, True upgrade with popup, False upgrade without pop up
*/
Parameter name /
Type Description Example
Return value

Controls whether the upgrade firmware pops True-pop up


Parameter name Boolean
up False-not pop up

Web :www.yishengtec.cn
40
Shenzhen Yisheng Technology Co., LTD

The return value of this interface has no


Returned value Boolean
reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.setUpdateSystemWithDialog (true); / / Set upgrade firmware pop up confirmation

5.5 Whether to delete the firmware package from the file after setting the

firmware upgrade
Function: public boolean setUpdateSystemDelete (boolean flag)
Description: whether to delete the firmware package from the file after setting the firmware upgrade
The API version of this interface: V4.2-20200330

/**
* @method setUpdateSystemDelete(boolean flag)
* @description whether to delete the firmware package from the file after setting the firmware upgrade, the
default is not deleted
* @date 20200330
* @author sky
* @param flag to delete after successful upgrade returns True, and not to delete after successful upgrade
returns False
*/
Parameter name /
Type Description Example
Return value

Controls whether the upgrade firmware is True-delete


Parameter name Boolean
deleted False-not delete

The return value of this interface has no


Returned value Boolean
reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.setUpdateSystemDelete (true); / / Set upgrade successfully delete firmware

Web :www.yishengtec.cn
41
Shenzhen Yisheng Technology Co., LTD

5.6 Silent uninstall Apk


Function: public boolean unInstallApk (String packagename)
Description: silent uninstall the Apk
The API version of this interface: V5.1-20210419
/**
* @methodunInstallApk(String packagename)
* @description silent uninstall the Apk
* @date 20210419
* @author sky
* @param packagename the package name that needs to be uninstalled
*/
Parameter name /
Type Description Example
Return value

Parameter name String Package name to be uninstalled com.bjw.ComAssistant

The return value of this interface has no


Returned value Boolean
reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.unInstallApk("com.bjw.ComAssistant");

Web :www.yishengtec.cn
42
Shenzhen Yisheng Technology Co., LTD

Chapter 6 Network
6.1 Get the device network mode
Function: public int getCurrentNetType()
Description: get the current Internet type
The API version of this interface: V1.0-20180602

/**
* @method getCurrentNetType()
* @description get the current network type
* @date 20180602
* @author sky
* @return returns “int” value, 0 Ethernet, 1 WIFI, 2 mobile network, -100 unknown network
*/
Parameter name /
Type Description Example
Return value

0 Ethernet, 1 WIFI, 2 mobile network


Returned value Int
-100 the unknown network

Example:
MyManager manager = MyManager.getInstance(this);
Int type = manager.getCurrentNetType();

6.2 Query the Ethernet MAC address


Function: public String getEthMacAddress()
Description: get the Ethernet MAC address
The API version of this interface: V2.0-20180806
/**
* @method getEthMacAddress()
* @description get the Ethernet Mac address
* @date 20180806
* @author sky
* @return returns the Ethernet Mac address, such as 30:1F: 9A: 61: BA: 8F
Web :www.yishengtec.cn
43
Shenzhen Yisheng Technology Co., LTD

*/
Parameter name /
Type Description Example
Return value

Returned value String The Ethernet MAC address 30:1F:9A:61:BA:8F

Example:
MyManager manager = MyManager.getInstance(this);
Log.e("ETH MAC=” manager.getEthMacAddress ());
/ / Output ETH MAC =30:1F: 9A: 61: BA: 8F

6.3 Query the Ethernet connection mode


Function: public String getEthMode()
Description: get the current Ethernet mode
The API version of this interface: V1.0-20180602
/**
* @method getEthMode()
* @description get the Ethernet mode, static or dynamic
* @date 20180602
* @author sky
* @return static mode returns StaticIp and dynamic mode returns DHCP
*/

Parameter name /
Type Description Example
Return value

Returned value String Ethernet mode StaticIp (Static), DHCP (dynamic)

Example:
MyManager manager = MyManager.getInstance(this);
Log. D ("API display", "Current mode =" + manager.getEthMode());
/ / Output, current mode = DHCP

Web :www.yishengtec.cn
44
Shenzhen Yisheng Technology Co., LTD

6.4 Query the Ethernet switch status


Function: public boolean getEthStatus()
Description: get whether the current Ethernet switch is on
The API version of this interface: V2.0-20180806
/**
* @method getEthStatus()
* @description get the switch state of the Ethernet network
* @date 20180806
* @author sky
* @return Ethernet switch on to returns True, switch off returns False
*/
Parameter name /
Type Description Example
Return value

True (on)
Returned value Boolean Ethernet switch status
False (off)

Example:
MyManager manager = MyManager.getInstance(this);
Log. D ("API display", "whether Ethernet is turned on =" + manager.getEthStatus());
/ / Output whether Ethernet is turned on = false

6.5 Query the subnet mask of the Ethernet


Function: public String getNetMask ()
Description: get the subnet mask of the current Ethernet
The API version of this interface: V2.0-20180806
/**
* @method getNetMask()
* @description get the subnet mask of the Ethernet
* @date 20180806
* @author sky
* @return returns the subnet mask of the current device Ethernet, such as 255.255.255.0
*/

Web :www.yishengtec.cn
45
Shenzhen Yisheng Technology Co., LTD

Parameter name
Type Description Example
/Return value

Returned value String Subnet mask 255.255.255.0

Example:
MyManager manager = MyManager.getInstance(this);
Log. D ("API display", "Subnet mask for Ethernet =" + manager.getNetMask());
/ / Output Subnet mask for the Ethernet = 255.255.255.0

6.6 Query the gateway of Ethernet


Function: public String getGateway ()
Description: get the gateway of the current Ethernet
The API version of this interface: V2.0-20180806
/**
* @method getGateway()
* @description Get the gateway of the Ethernet
* @date 20180806
* @author sky
* @return returns to the gateway of the current device Ethernet, such as 192.168.1.1
*/
Parameter name /
Type Description Example
Return value

Returned value String Gateway 192.168.1.1

Example:
MyManager manager = MyManager.getInstance(this);
Log. D ("API display", "Ethernet gateway =" + manager.getGateway());
/ /Output Ethernet gateway = 192.168.1.1

6.7 Query Dns 1 of the Ethernet


Function: public String getEthDns1 ()
Description: get Dns 1 of the current Ethernet

Web :www.yishengtec.cn
46
Shenzhen Yisheng Technology Co., LTD

The API version of this interface: V2.0-20180806


/**
* @method getEthDns1()
* @description get the DNS 1 of the Ethernet
* @date 20180806
* @author sky
* @return returns the DNS 1 of the current device Ethernet, such as 192.168.1.1
*/
Parameter name /
Type Description Example
Return value

Returned value String Dns1 192.168.1.1

Example:
MyManager manager = MyManager.getInstance(this);
Log. And d ("API display", "dns 1 of Ethernet =" + manager.getEthDns1 ());
/ / Output the dns of Ethernet with 1 = 192.168.1.1

6.8 Query Dns 2 of the Ethernet


Function: public String getEthDns2()
Description: get the Dns 2 of the current Ethernet
The API version of this interface: V2.0-20180806
/**
* @method getEthDns2()
* @description get the DNS 2 of the Ethernet
* @date 20180806
* @author sky
* @return returns the DNS 2 of the current device Ethernet, such as 192.168.1.1
*/
Parameter name /
Type Description Example
Return value

Returned value String Dns2 192.168.1.1

Example:
Web :www.yishengtec.cn
47
Shenzhen Yisheng Technology Co., LTD

MyManager manager = MyManager.getInstance(this);


Log. And d ("API display", "dns of Ethernet 2 =" + manager.getEthDns2());
/ / Output dns 2 = 192.168.1.1

6.9 Set Ethernet to dynamic acquisition mode


Function: public boolean setDhcpIpAddress (Context context)
Description: set Ethernet mode to dynamic acquisition
The API version of this interface: V1.0-20180602
/**
* @method setDhcpIpAddress(Context context)
* @description set the Ethernet mode to dynamic
* @date 20180602
* @author sky
* @param context, context object
*/
Parameter name /
Type Description Example
Return value

Parameter name Context Context object

The return value of this interface has


Returned value Boolean
no reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.setDhcpIpAddress(this);

6.10 Set Ethernet to static acquisition mode


Function: public boolean setStaticEthIPAddress (String IPaddr, String gateWay, String mask, String dns1,
String dns2)
Description: set Ethernet to static acquisition mode
The API version of this interface: V1.0-20180602

Web :www.yishengtec.cn
48
Shenzhen Yisheng Technology Co., LTD

/**

* @method setStaticEthIPAddress(String IPaddr, String gateWay, String mask, String dns1, String dns2)
* @description set the Ethernet mode to static, and specify the relevant parameters
* @date 20180602
* @author sky
* @param IPaddr, set IP address.gateWay, Set the gateway. Mask, set the subnet mask. The dns 1 and dns 2
are the set dns values
*/
Parameter name /
Type Description Example
Return value

IPaddr String IP address "192.168.1.125"

gateWay String Gateway "192.168.1.1"

mask String subnet mask "255.255.255.0"

dns1 String DNS "192.168.1.1"

ipLength String DNS "0.0.0.0"

The return value of this interface has no


Returned value Boolean
reference value

Note: Gateway, subnet mask, and DNS should be set to legal data

Example:
MyManager manager = MyManager.getInstance(this);
manager.setStaticEthIPAddress("192.168.1.125", "192.168.1.1","255.255.255.0","192.168.1.1","0.0.0.0");

6.11 Get the Ethernet dynamic IP address


Function: public String getDhcpIpAddress()
Description: get the dynamic IP address of the Ethernet
The API version of this interface: V1.0-20180602
/**
* @method getDhcpIpAddress()
* @description get the dynamic IP address of the Ethernet

Web :www.yishengtec.cn
49
Shenzhen Yisheng Technology Co., LTD

* @date 20180602
* @author sky
* @return returns the Ethernet dynamic IP address
*/
Parameter name /
Type Description Example
Return value

Returned value String The Dynamic IP address of the Ethernet 192.168.1.100

Example:
MyManager manager = MyManager.getInstance(this);
Log. And d ("API Display", "ETH IP =" + myManager.getDhcpIpAddress());
/ / Output: ETH IP =192.168.1.103

6.12 Get the static IP address of the Ethernet


Function: public String getStaticEthIPAddress()
Description: get the static IP address of the Ethernet
The API version of this interface: V1.0-20180602
/**
* @method getStaticEthIPAddress()
* @description get the static IP of the Ethernet
* @date 20180602
* @author sky
* @return returns the static IP address of the Ethernet
*/
Parameter name /
Type Description Example
Return value

Returned value String The static IP address of the Ethernet 192.168.1.100

Example:
MyManager manager = MyManager.getInstance(this);
Log. And d ("API Display", "ETH IP =" + manager.getStaticEthIPAddress();
/ / Output: ETH IP =192.168.1.103

Web :www.yishengtec.cn
50
Shenzhen Yisheng Technology Co., LTD

6.13 Control the Ethernet switch


Function: public boolean ethEnabled (boolean enable)
Description: control the Ethernet switch
The API version of this interface: V1.0-20180602

/**
* @method ethEnabled(boolean enable)
* @description control the Ethernet switch
* @date 20180602
* @author sky
* @param enable, turn on the Ethernet switch incoming true, close the Ethernet switch incoming false
*/
Parameter name /
Type Description Example
Return value

True-turn on Ethernet
Parameter Boolean True-on; false-off
False-turn off Ethernet

The return value of this interface has no


Returned value Boolean
reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.ethEnabled (false); / / close Ethernet

6.14 ppoe dial-up (this interface has been removed after V5.2)
Function: public void setPppoeDial (Context context, String userName, String password)
Description: set ppppoe dial-up
The API version of this interface: V4.2-20200330

Parameter name /
Type Description Example
Return value

Parameter name Context Context object

Parameter name String Dial-up username

Web :www.yishengtec.cn
51
Shenzhen Yisheng Technology Co., LTD

Parameter name String Password for the dial-up

Example:
MyManager manager = MyManager.getInstance(this);
manager.setPppoeDial(this,”username ”,”password ”);

Web :www.yishengtec.cn
52
Shenzhen Yisheng Technology Co., LTD

Chapter 7 Storage
7.1 Query the external storage SD card path
Function: public String getSDcardPath()
Description: get the external storage SD card path
The API version of this interface: V1.0-20180602
/**
* @method getSDcardPath()
* @description get the external SD card path
* @date 20180602
* @author sky
* @return returns to the external SD card path
*/
Parameter name /
Type Description Example
Return value

Returned value String External storage SD card absolute path

Example:
MyManager manager = MyManager.getInstance(this);
Log. And d (API Test, SD=, + manager.getSDcardPath());
/ / Output API: external SD card path = / mnt / external _ sd

7.2 Query the external storage U disk path


Function: public String getUSBStoragePath (int num)
Description: get the external storage U disk path
The API version of this interface: V1.0-20180602
/**
* @method getUSBStoragePath(int num)
* @description get the external U disk path
* @date 20180602
* @author sky
* @param num, starting from 0, it indicates the first U disk
* @return the path of the U disk
Web :www.yishengtec.cn
53
Shenzhen Yisheng Technology Co., LTD

*/

Parameter name /
Type Description Example
Return value

num Int U disk 0,1,2,3

Returned value String External storage U disk absolute path

Note:
Need to set the path in the source code to run the Demo normally

Example:
MyManager manager = MyManager.getInstance(this);
Log. And d (API Test, USB Path =, + manager.getUSBStoragePath(0));
/ / Output / mnt / usb _ storage / USB _ DISK 2 / udisk0;

7.3 Query the port absolute path


Function: public String getUartPath (String uart)
Description: get the serial port absolute path.
The API version of this interface: V1.0-20180602

/**
* @method getUartPath(String uart)
* @description get the absolute path of the serial port
* @date 20180602
* @author sky
* @param uart, the serial port is the incoming serial number, like the serial port 0 into TTYS 0
* @return returns the absolute path of the specified serial port
*/
Parameter name /
Type Description Example
Return value

Serial port corresponding to the port number uart 0, uart 1,


Uart String “TTYS0
uart 2, uart 3

Returned value String UART absolute path /dev/ttyS0

Web :www.yishengtec.cn
54
Shenzhen Yisheng Technology Co., LTD

Example:
MyManager manager = MyManager.getInstance(this);
Log. And d ("API test", "UART-1=" + manager.getUartPath (“TTYS1”));
/ / Output UART-1= / dev / ttyS 1

Web :www.yishengtec.cn
55
Shenzhen Yisheng Technology Co., LTD

Chapter 8 Timer switch


8.1 Set the timer switch of weekly mode
Function: public boolean setPowerOnOffWithWeekly (int [] powerOnTime, int [] powerOffTime, int []
weekdays)
Description: set the timer switch, weekly mode, only one set of switch times a day
The API version of this interface: V4.0-20200115
/**
* @method setPowerOnOffWithWeekly(int[] powerOnTime,int[] powerOffTime,int[] weekdays)
* @description weekly mode set timer switch, only one set of switch time a day
* @date 20200113
* @author sky
* @param powerOnTime, start-up time, such as, {8,30}.powerOffTime, Shutdown time, such as, {18,30}.
* weekdays, Monday to Sunday working status, 1 means power on, 0 means power off. Such as,
{1,1,1,1,1,0,0}, is the switch being executed from Monday to Friday
*/
Parameter name /
Type Description Example
Return value

Boom time, hour and minute


PowerOnTime Int[ ] {8,30}

Shutdown time, hour and minute


PowerOffTime Int[ ] {18,30}

Weekdays Int[ ] Working status from Monday to Sunday {1,1,1,1,0,0,1}

The return value of this interface has no


Returned value Boolean
reference value

Note:
This method can only have one set of time in a day, and the startup time is before, and the shutdown time is
after

Example:
MyManager manager = MyManager.getInstance(this);
int [] timeonArray = new int{8,30};
Web :www.yishengtec.cn
56
Shenzhen Yisheng Technology Co., LTD

int [] timeoffArray = new int{18,30};


Int [] weekdays = new int {1,1,1,1,1,0,0}; / / Monday to Sunday, 1 is on and 0 is not on
manager.setPowerOnOffWithWeekly(timeonArray,timeoffArray,weekdays);
Set the above time will be turned on at 8:30 from Monday to Friday and turned off at 18:30.

8.2 Set a set of timer switches


Function: public boolean setPowerOnOff (int [] powerOnTime, int [] powerOffTime)
Description: set a set of timer switches, can be set multiple times a day, need to pass in the year, month, day,
hour and minute
The API version of this interface: V4.0-20200115
/**
* @method setPowerOnOff(int[] powerOnTime,int[] powerOffTime)
* @description set a set of timing switch time data, need to enter the time points
* @date 20200113
* @author sky
* @param powerOnTime, Boot-up time, e. g. {2020,1,10,20,48}, powerOffTime, shutdown time, e. g.
{2020,1,10,20,38}.
*/
Parameter name /
Type Description Example
Return value

Boot time, year, month, day, hour and

PowerOnTime Int[ ] minute {2020,01,13,18,40}

Shutdown time, year, month, day, hour

PowerOffTime Int[ ] and minute {2020,01,13,18,30}

The return value of this interface has no


Returned value boolean
reference value

Note:
When this method is set, the shutdown time is before, and the startup time is after

Example:
Web :www.yishengtec.cn
57
Shenzhen Yisheng Technology Co., LTD

MyManager manager = MyManager.getInstance(this);


int [] timeoffArray = new int{2018,1,10,20,38};
int [] timeonArray = new int{2018,1,10,20,48};
m anager.setPowerOnOff(timeonArray,timeoffArray);
The above time will be set on January 10,2018, close at 20:38 and turn on at 20:48
Note: This method is also applicable to only set the startup time, just pass the shutdown time to 0, i. e
int [] timeoffArray = new int{0,0,0,0,0};

8.3 Get the current timer switch mode of the device


Function: public String getPowerOnMode()
Description: get the timer switch mode
The API version of this interface: V4.0-20200115
/**
* @method getPowerOnMode()
* @description get the mode of the timing switch machine
* @date 20200113
* @author sky
* @return "0" means the switch time set locally in the timer switch."2" means calling the
setPowerOnOffWithWeekly method by broadcast."1" means calling the setPowerOnOff method by broadcast.
*/
Parameter name /
Type Description Example
Return value

Returned value String Switch mode “0”

Example:
MyManager manager = MyManager.getInstance(this);
m anager.getPowerOnMode();

8.4 Get the startup time of the device's current timer switch
Function: public String getPowerOnTime()
Description: get the startup time
The API version of this interface: V4.0-20200115
/**
Web :www.yishengtec.cn
58
Shenzhen Yisheng Technology Co., LTD

* @method getPowerOnTime()
* @description get the startup time of the current device
* @date 20200113
* @author sky
* @return returns to the current set boot time, such as 202001132025, refers to the 20:25 boot on January
13,2020
*/
Parameter name /
Type Description Example
Return value

Returned value String 202001132025


Timer switch-on time

Example:
MyManager manager = MyManager.getInstance(this);
m anager.getPowerOnTime();

8.5 Get the shutdown time of the current timing switch machine
Function: public String getPowerOffTime()
Description: get the shutdown time of the timer switch
The API version of this interface: V4.0-20200115
/**
* @method getPowerOffTime()
* @description get the shutdown time of the current device
* @date 20200113
* @author sky
* @return returns to the current boot time set, such as 202001132020, refers to the 20:20 shutdown on
January 13,2020
*/
Parameter name /
Type Description Example
Return value

Returned value String Timer switch- off time 202001132020

Example:
MyManager manager = MyManager.getInstance(this);
Web :www.yishengtec.cn
59
Shenzhen Yisheng Technology Co., LTD

m anager.getPowerOffTime();

8.6 Get the last power on time of the device's timer switch
Function: public String getLastestPowerOnTime()
Description: get the last executed boot time of the device

The API version of this interface: V4.0-20200115


/**
* @method getLastestPowerOnTime()
* @description get last boot time of the device
* @date 20200113
* @author sky
* @return the last startup time of the return device, such as 202001132025, means that the startup operation
was performed at 20:25 on January 13,2020
*/

Parameter name /
Type Description Example
Return value

The last timer switch on time


Returned value String 202001132025

Example:
MyManager manager = MyManager.getInstance(this);
m anager.getLastestPowerOnTime();

8.7 Get the last shutdown time of the device's timer switch
Function: public String getLastestPowerOffTime()
Description: get the startup time last performed
The API version of this interface: V4.0-20200115
/**

Web :www.yishengtec.cn
60
Shenzhen Yisheng Technology Co., LTD

* @method getLastestPowerOffTime()
* @description get the startup time of the device last performed
* @date 20200113
* @author sky
* @return the last startup time of the return device, such as 202001132020, means that the startup operation
was performed at 20:20 on January 13,2020
*/
Parameter name /
Type Description Example
Return value

Returned value String Last time switch machine time 202001132020

Example:
MyManager manager = MyManager.getInstance(this);
m anager.getLastestPowerOffTime();

8.8 Clear the timer switch data


Function: public boolean clearPowerOnOffTime()
Description:clear the timer switch time
The API version of this interface: V4.0-20200115
/**
* @method clearPowerOnOffTime()
* @description clear the timer switch time
* @date 20200113
* @author sky
*/

Example:
MyManager manager = MyManager.getInstance(this);
m anager.clearPowerOnOffTime();

8.9 Get the timer switch version


Function: public String getVersion()

Web :www.yishengtec.cn
61
Shenzhen Yisheng Technology Co., LTD

Description: get the timer switch version number


The API version of this interface: V4.0-20200115

Parameter name /
Type Description Example
Return value

Returned value String Timer switch machine version YS_1.0_20180312

Example:
MyManager manager = MyManager.getInstance(this);
m anager.getVersion();

8.10 Get whether the equipment has set the timer switch
Function: public boolean isSetPowerOnTime()
Description: get whether the device is equipped with a timer switch

The API version of this interface: V4.0-20200115

Parameter name /
Type Description Example
Return value

Returned value Boolean Whether the timer switch is set True

Example:
MyManager manager = MyManager.getInstance(this);
m anager.isSetPowerOnTime();

Web :www.yishengtec.cn
62
Shenzhen Yisheng Technology Co., LTD

Chapter 9 GPIO index value control


Note:
After version V5.2-20210831, for all GPIO interfaces, the parameter gpio passes by value 1.... .N,
means to get the reserved IO ports of the device.
Example
Rk3288-M8 motherboard reserved four IO ports, respectively 139,138,68,69, then the corresponding
pass by value 1,2,3,4; some motherboard reserved IO ports more or less, and so on, V5.2-20210831
the following version please ignore (need to pass the actual index value, such as 139);

9.1 Set the state of the io port to input or output


Function: public boolean setGpioDirection (int gpio, int arg)
Description: set whether the gpio is input or output according to the io port value
The API version of this interface: V4.1-20200213
/**
* @method setGpioDirection(int gpio, int arg)
* @description set the state of the io port to input or output
* @date 20200213
* @author sky
* @param gpio, the gpio value 1 for gpie 1. arg, 1 means set to input port, 0 means set to output port.
* @return set successfully return True and failed return False
*/
Parameter name /
Type Description Example
Return value

Returned value Boolean Whether the setting is successful Successful-True, failed-False

Parameter values Gpio The gpio value 1

Parameter values Arg Input or output Input port-1 output port-0

Example:
MyManager manager = MyManager.getInstance(this);
m anager.setGpioDirection(1, 0);

9.2 Get whether the current gpie is an input port or an output port
Function: public String getGpioDirection (int gpio)

Web :www.yishengtec.cn
63
Shenzhen Yisheng Technology Co., LTD

Description: Get whether the current state of the gpio is input or output based on the specific gpio value. This
method also determines if the gpio is valid, if no value is returned, it means that the gpio is not available
The API version of this interface: V4.1-20200213
/**
* @method getGpioDirection(int gpio)
* @description get whether the current state of the gpio is input or output based on the specific gpio value
* @date 20200213
* @author sky
* @param gpio, gpio value
* @return the input port returns In, and the output port returns Out
*/
Parameter name /
Type Description Example
Return value

Returned value String Input or output Input-In output-Out

Parameter values Int Gpio price 1

Example:
MyManager manager = MyManager.getInstance(this);
m anager.getGpioDirection(1);

9.3 Set the level of the gpio


Function: public boolean writeGpioValue (int gpio, String arg)
Description: Control the level of the gpio according to the specific gpio value
The API version of this interface: V4.1-20200213
/**
* @method writeGpioValue(int gpio, String arg)
* @description control the gpio level, only for the output port
* @date 20200213
* @author sky
* @param gpio, gpio value. Arg, high level- -1, and low level- -0
* @return set successfully return “true” and failed return “false”
*/

Web :www.yishengtec.cn
64
Shenzhen Yisheng Technology Co., LTD

Parameter name /
Type Description Example
Return value

Returned value Boolean Whether the setting is successful Successful-True, failed-False

Parameter name Int Gpio value 1

Parameter name String High and low level High-1, low-0

Example:
MyManager manager = MyManager.getInstance(this);
m anager.writeGpioValue(1, 1);

9.4 Get the level of the current gpio


Function: public String getGpioValue (int gpio)
Description: get the level of the current gpio
The API version of this interface: V4.1-20200213
/**
* @method getGpioValue(int gpio)
* @description get the level of the current gpio
* @date 20200213
* @author sky
* @param gpio, gpio value
* @return High level returns 1 and low level returns 0
*/
Parameter name /
Type Description Example
Return value

Returned value String High level or low level High level- -1 and low level- -0

Parameter name Int Gpio value 1

Example:
MyManager manager = MyManager.getInstance(this);
m anager.getGpioValue(1);

Web :www.yishengtec.cn
65
Shenzhen Yisheng Technology Co., LTD

Chapter 10 Other
10.1 Set and save the system time
Function: public boolean setTime (int year, int month, int day, int hour, int minute, int sec)
Description: set and save the system time
The API version of this interface: V1.0-20180602
/**
* @method setTime(int year, int month, int day, int hour, int minute, int sec)
* @description set the system time
* @date 20180602
* @author sky
* @param enter the year, month, day, hour, minute and second to be set, where the month is from 1-12, and
the time is in 24-hour system.
*/
Parameter name /
Type Description Example
Return value

Year Int Year

Month Int Month (1 to 12)

Day Int Day

Hour Int (24-hour system) hours

Minute Int (24-hour system) minutes

Sec Int Second

The return value of this interface has


Returned value Boolean
no reference value

Example:
/ / Settings 2016-03-16,13:44:20
MyManager manager = MyManager.getInstance(this);
manager.setTime (2016, 3, 16, 13, 44,20);

Web :www.yishengtec.cn
66
Shenzhen Yisheng Technology Co., LTD

10.2 Turn automatic time determination on or off


Function: public boolean switchAutoTime (boolean open)
Description: set the automatic time determination on or off
The API version of this interface: V1.0-20180602
/**
* @method switchAutoTime(boolean open)
* @description controls the switch to automatically determine the date and time
* @date 20180602
* @author sky
* @param open, enter True is turn on the switch, False is turn off the switch
*/
Parameter name /
Type Description Example
Return value

True-turn on automatically determines time


Parameter name Boolean
False-turn off automatically determines time

The return value of this interface has no


Returned value Boolean
reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.switchAutoTime (false); / / Close the automatic date and time

10.3 Control whether the soft keyboard can pop up


Function: public boolean setSoftKeyboardHidden (boolean hidden)
Description: control whether the soft keyboard can pop up
The API version of this interface: V1.0-20181126
/**
* @method setSoftKeyboardHidden(boolean hidden)
* @description control whether the soft keyboard pops up (mainly EditText controls)
* @date 20181126
* @author sky
Web :www.yishengtec.cn
67
Shenzhen Yisheng Technology Co., LTD

* @param hidden, enter True is to hide the soft keyboard,enter False is to display the soft keyboard
*/
Parameter name /
Type Description Example
Return value

True-soft keyboard can pop up


Parameter name Boolean
False-soft keyboard can’t pop up

The return value of this interface has no


Returned value Boolean
reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.setSoftKeyboardHidden(false);

10.4 Control of dormancy time


Function: public boolean setDormantInterval (Context context, long time)
Description: control of dormancy time
The API version of this interface: V2.2-20181129
/**
* @method setDormantInterval(Context context, long time)
* @description control of dormancy time
* @date 20181129
* @author sky
* @param context, context object. time, time interval (no operating system enters hibernation during the
interval)
*/
Parameter

name / Return Type Description Example

value

If the interval is 15s hibernation,


Parameter Long Time interval (2147483647)
the passed parameter is 15,000

Boolea The return value of this interface has no reference


Returned value
n value

Web :www.yishengtec.cn
68
Shenzhen Yisheng Technology Co., LTD

Example:
MyManager manager = MyManager.getInstance(this);
manager.setDormantInterval(context,15000);

10.5 Query automatically determine network time status


Function: public boolean isAutoSyncTime()
Description: get whether the switch to automatically determine the network time is turned on
The API version of this interface: V2.0-20180806
/**
* @method isAutoSyncTime()
* @description get the state of the switch that automatically determines the network time
* @date 20180806
* @author sky
* @return returns to True description turns on automatic determine network time, return to False description
turns this switch off
*/
Parameter name /
Type Description Example
return value

True-turn on automatically determines time


Returned value Boolean
False-turn off automatically determines time

Example:
MyManager manager = MyManager.getInstance(this);
manager.isAutoSyncTime();

10.6 Execute shell commands with ROOT authority


Function: public boolean execSuCmd (String command)
Description: execute shell commands with ROOT authority
The API version of this interface: V5.2-20210831
/**
* @method execSuCmd(String command)
* @description execute shell commands with the root authority
* @date 20180602
* @author sky

Web :www.yishengtec.cn
69
Shenzhen Yisheng Technology Co., LTD

* @param command, pass in shell commands that required to be executed, such as reboot
*/
Parameter name /
Type Description Example
Return value

Parameter String Shell command to be executed “reboot ”

Return True to execute successfully, False


Returned value Boolean
to execute failed

Example:
/ / Execution restart
MyManager manager = MyManager.getInstance(this);
manager.execSuCmd (“reboot ”);

10.7 Get the HDMI output status


Function: public boolean getHdmiinStatus()
Description: HDMI input status
The API version of this interface: V1.0-20180602
/**
* @method getHdmiinStatus()
* @description get the HDMI connection status
* @date 20180602
* @author sky
* @return HDMI output returns True, otherwise returns False
*/
Parameter name /
Type Description Example
Return value

Returned value Boolean False-no HDMI output, True- has HDMI output

Example:
MyManager manager = MyManager.getInstance(this);
Toast.makeText(getApplicationContext(),”HDMI” +
manager.getHdmiinStatus(),Toast.LENGTH_SHORT).show();

Web :www.yishengtec.cn
70
Shenzhen Yisheng Technology Co., LTD

10.8 Set default input method


Function: public boolean isSetDefaultInputMethodSuccess (String defaultInputMethod)
Description: set default input method
The API version of this interface: V3.1-20190228
/**
* @method isSetDefaultInputMethodSuccess(String defaultInputMethod)
* @description set default input method, and judge whether the setting is successful
* @date 20190228
* @author sky
* @param defaultInputMethod, set the package name of the input method, such as Google Pinyin input
method " com.google.android.inputmethod.pinyin/.PinyinIME"
* @return set successfully return“true", failed return“false”
*/
Parameter name /
Type Description Example
Return value

The package name of the default input Google Pinyin


Parameter name String com.google.android.inputmethod.pinyin/.
method apk PinyinIME

Successful return True , failed returns


Returned value Boolean Whether the setting is successful
False

Example:
MyManager manager = MyManager.getInstance(this);
manager.isSetDefaultInputMethodSuccess(“com.google.android.inputmethod.pinyin/.PinyinIME ”);

10.9 Get default input method


Function: public String getDefaultInputMethod()
Description: get default input method
The API version of this interface: V3.1-20190228
/**
* @method getDefaultInputMethod()
* @description get the current system input method
* @date 20190228
* @author sky
Web :www.yishengtec.cn
71
Shenzhen Yisheng Technology Co., LTD

* @return returns the package name of the current input method, such as
com.google.android.inputmethod.pinyin/.PinyinIME
*/
Parameter name /
Type Description Example
Return value

Package name of he current input method Google Pinyin


Parameter name String com.google.android.inputmethod.p
apk inyin

Example:
MyManager manager = MyManager.getInstance(this);
manager.getDefaultInputMethod();

10.10 Set system language


Function: public boolean setLanguage (String language, String country)
Description: set system language
The API version of this interface: V3.2-20190513
/**
* @method setLanguage(String language, String country)
* @description set the current system default language
* @date 20190513
* @author sky
* @param language, Language, such as in zh.country, Country, such as CN
*/
Parameter name /
Type Description Example
Return value

Simplified Chinese, chCN


Parameter name String Set language (lowercase) and country (caps) Chinese Taiwan, zhTW
Canada English, enCA
The return value of this interface has no
Returned value Boolean
reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.setLanguage(“zh ”,”CN ”);

Web :www.yishengtec.cn
72
Shenzhen Yisheng Technology Co., LTD

10.11 Get device CPU temperature


Function: public String getCPUTemperature()
Description: get device CPU temperature.
The API version of this interface: V3.3-20190619
/**
* @method getCPUTemperature()
* @description get the current system CPU temperature
* @date 20190619
* @author sky
* @return return “int” value in degrees Celsius
*/
Parameter name /
Type Description Example
Return value

Parameter name String The device CPU temperature

Example:
MyManager manager = MyManager.getInstance(this);
Log. D ("API display", "Device CPU temperature:" + manager.getCPUTemperature());

10.12 Turn the adb connection on or off


Function: public boolean setADBOpen (boolean open)
Description: turn the adb on or off
The API version of this interface: V3.4-20190628
/**
* @method setADBOpen(boolean open)
* @description turn the adb on or off
* @date 20190628
* @author sky
* @param open, true, open the adb connection switch. false, close the adb connection
*/

Web :www.yishengtec.cn
73
Shenzhen Yisheng Technology Co., LTD

Parameter name /
Type Description Example
Return value

Whether to open adb,

Parameter Boolean True: open

False: close

The return value of this interface has no


Returned value Boolean
reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.setADBOpen(true);

10.13 Replace boot animation


Function: public boolean replaceBootanimation (String path)
Description: replace the boot animation
The API version of this interface: V3.4-20190628
/**
* @method replaceBootanimation(String path)
* @description replace the boot animation
* @date 20190628
* @author sky
* @param path, boot animation bootanimation. the absolute path where the zip is located
*/

Parameter name /
Type Description Example
Return value

Parameter String The path of the boot animation /storage/emulated/0/bootanimation.zip

The return value of this

Returned value Boolean interface has no reference

value

Example:
Web :www.yishengtec.cn
74
Shenzhen Yisheng Technology Co., LTD

MyManager manager = MyManager.getInstance(this);


manager.replaceBootanimation(“/storage/emulated/0/bootanimation.zip ”);

10.14 Set default Launcher


Function: public boolean setDefaultLauncher (String packageAndClassName)
Description: system has more than one Launcher, and the default Launcher can be set
The API version of this interface: V3.5-20190719
/**
* @method setDefaultLauncher(String packageAndClassName)
* @description set the system default Launcher
* @date 20190719
* @author sky
* @param packageAndClassName, set the package name and startup class name of the Launcher, such as "
com.android.launcher3/com.android.launcher3.Launcher"
*/

Parameter name /
Type Description Example
Return value

The package name and startup class name of


Default Launcher package name the Launcher3
Parameter String
and startup class name "com.android.launcher3/com.android.launcher3
.Launcher"
The return value of this interface
Returned value boolean
has no reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.setDefaultLauncher("com.android.launcher3/com.android.launcher3.Launcher");

10.15 Execute shutdown operation (repeat, remove)


Function: public void shutdown()
Description: the method to wake up the system after dormancy
The API version of this interface: V4.3-20200521
/**
* @method shutdown()

Web :www.yishengtec.cn
75
Shenzhen Yisheng Technology Co., LTD

* @description execute the shutdown operation, following the standard Android shutdown process
* @date 20180602
* @author sky
*/

Example:
MyManager manager = MyManager.getInstance(this);
manager.shutdown();

10.16 Set start-up


Function: public boolean selfStart (String packagname)
Description: set the app to start-up
The API version of this interface: V5.1-20210716
/**
* @method selfStart(String packagname)
* @description set the start-up
* @date 2021-07-16
* @author zyh
* @param packagname, Package name
*/
Parameter name /
Type Description Example
Return value

Parameter String Application package name rkandroidapi.ys.com.rkandroidapi

The return value of this interface


Returned value Boolean
has no reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.selfStart("rkandroidapi.ys.com.rkandroidapi");

10.17 Set daemon application


Function: public boolean daemon (String packageName, int value)
Description: set the daemon application

Web :www.yishengtec.cn
76
Shenzhen Yisheng Technology Co., LTD

The API version of this interface: V5.1-20210716


/**
* @param packageName The package name of the daemon application, none means none
* @param value, Daemon time 0 = 30s, 1 = 60s 2=180 s, default is 30s
* @return
* @method daemon
* @description Set the daemon
* @date: 2021/7/16
* @author: zouyuanhang
*/
Parameter name /
Type Description Example
Return value

The package name of the


Parameter String rkandroidapi.ys.com.rkandroidapi
daemon app

Parameter Int Daemon time 0

The return value of this interface


Returned value Boolean
has no reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.daemon("rkandroidapi.ys.com.rkandroidapi",1);

10.18 Set whether to enable the application installation whitelist

and add the app to the list


Function: public boolean setAppInstallWhitelist (String isopen, String packageName)
Description: application installation whitelist
The API version of this interface: V5.1-20210716
/**
* @param isopen true “Enable whitelist” false “disable”
* @param packageName add the whitelist application package name, if need to delete the application package
name, can use the Utils.removeFileData(packageName,false )
* @return

Web :www.yishengtec.cn
77
Shenzhen Yisheng Technology Co., LTD

* @method setAppInstallWhitelist
* @description Add a whitelist of app installations
* @date: 2021/1/12
* @author: zouyuanhang
*/
Parameter

name /Return Type Description Example

value

True
True-enabled whitelist Note: If you close the whitelist, need to input
Parameter String
False-disable whitelist the value false to attribute persist.neo.
WhiteList

add the whitelist application


Parameter String rkandroidapi.ys.com.rkandroidapi
package name

The return value of this interface


Returned value Boolean
has no reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.setAppInstallWhitelist("true","rkandroidapi.ys.com.rkandroidapi");

10.19 Set whether to enable the application installation blacklist

and add the app to the list


Function: public void setAppInstallBlacklist (String isopen, String packageName)
Description: delete the app installation whitelist
The API version of this interface: V5.1-20210716
/**
* @param isopen true “Enable the blacklist” false “disable”
* @param packageName add the blacklist application package name, if need to delete the application package
name, can use the Utils.removeFileData(packageName,true)
* @return
* @method setAppInstallBlacklist
* @description add application installation blacklist

Web :www.yishengtec.cn
78
Shenzhen Yisheng Technology Co., LTD

* @date: 2021/1/12
* @author: zouyuanhang
*/
Parameter name /
Type Description Example
return value

True
True-enabled blacklist
Parameter String Note: If you close the blacklist, need to input the
False-disable blacklist
value false to persist.neo.blackList
Add the application package
Parameter String rkandroidapi.ys.com.rkandroidapi
name for the blacklist

The return value of this

Returned value boolean interface has no reference

value

Example:
MyManager manager = MyManager.getInstance(this);
manager.setAppInstallBlacklist("true","rkandroidapi.ys.com.rkandroidapi");

10.20 Turn the network adb connection on or off


Function: public boolean setNetworkAdb (boolean open)
Description:turn the adb on or off
The API version of this interface: V3.4-20190628
/**
* @method setNetworkAdb (boolean open)
* @description turn the network adb connection on or off
* @date 20190628
* @author sky
* @param open, true, turn on the network adb connection switch. False, turn off the network adb connection
*/
Parameter name /
Type Description Example
Return value

Whether to turn on the network adb,


Parameter Boolean True-turn on
False-turn off

Web :www.yishengtec.cn
79
Shenzhen Yisheng Technology Co., LTD

The return value of this interface has no


Returned value Boolean
reference value

Example:
MyManager manager = MyManager.getInstance(this);
manager.setNetworkAdb(true);

Web :www.yishengtec.cn
80

You might also like