com.pax.dal

Interface ISys



  • public interface ISys
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method and Description
      void addService(java.lang.String name, android.os.IBinder service)
      将服务添加到ServiceManager中。
      Add a service to the ServiceManager.
      void allowAccessContactsBtPairing(boolean flag)
      蓝牙配对界面是否需要显示访问通信录和通话记录提示框
      Whether to display the access address book and call history prompt box on the Bluetooth pairing interface
      void allowBtOpenAirplane(boolean enable)
      飞行模式下是否保持蓝牙打开状态
      Whether to keep Bluetooth on in airplane mode
      void beep()
      蜂鸣器立即发出一声“嘀”,持续时间为 100ms。
      The buzzer immediately emits a "beep" for 100ms.
      boolean beep(EBeepMode mode, int timeMs)
      蜂鸣器操作
      Buzzer operation
      int beep(java.lang.String params)
      按频率参数列表发声
      beep with the list of frequency parameters
      boolean checkPermission(java.lang.String packageName, java.lang.String usesPermission)
      判断设备操作权限
      To check whether APK has operating permission by given device
      void controlTaxPower(int mode, boolean on)
      税控模块上电接口。
      Power-on interface of the tax control module.
      void disableAnimations(boolean disable)
      禁用系统动画
      Disable system animation
      void disableCamera(boolean disable)
      设置是否禁用摄像头功能
      Set whether to disable the camera function.
      void disableEmergency(boolean disable)
      屏蔽关机菜单中的紧急拨号功能。
      Block the emergency dial function in the shutdown menu.
      void disableGlobalAirPlane(boolean disable)
      隐藏关机菜单中的飞行模式
      Hide Airplane Mode in the shutdown menu
      void disableGlobalSilent(boolean disable)
      隐藏关机菜单中的响铃功能
      Hide the ringing function in the shutdown menu
      boolean disableKeyEvent()
      禁用物理键盘, 仅适用于带物理键盘的终端
      disable physical keyboard, apply only to terminal with keyboard
      void disablePosMenu(java.util.Map<PosMenu,java.lang.Boolean> posMenu)
      隐藏或显示系统设置的菜单和快捷设置的开关。调用会清除上一次调用产生的效果。
      Hide or show the system settings menu and quick settings switch.
      void disableScreenshot(boolean disable)
      屏蔽关机菜单中的系统截图功能。
      Block the system screenshot function in the shutdown menu.
      void disableVolumeSafetyWarningDialog(boolean disable)
      设置是否显示安全音量警告提醒弹框。
      Set whether to display the safety volume warning reminder pop-up box.
      boolean enableADBAndMTP(boolean enable)
      设置是否允许ADB和MTP。如果开启权限检查,需在AndroidManifest下添加以下权限: "com.pax.permission.USB_SECURITY"
      Set whether to allow ADB and MTP.If permission checking is enabled, add the following permissions under AndroidManifest :"com.pax.permission.USB_SECURITY"
      void enableApplication(java.lang.String packageName, boolean enable)
      设置应用是否可用。
      Set whether the app is available.
      void enableAuthDownload(boolean enable)
      使能百富授权。
      Enable PAX authorization.
      void enableAutoTime(boolean enable)
      设置是否开启自动确定时间和日期。
      Set whether to enable automatic determination of time and date.
      void enableAutoTimeZone(boolean enable)
      设置是否开启自动确定时区。
      Set whether to enable automatic time zone determination.
      void enableBaseUsb(boolean enable)
      禁用或者启用底座USB切换。
      Disable or enable base USB switching.
      void enableBatteryLevelShow(boolean enable)
      设置是否显示电量百分比。
      Set whether to display battery percentage.
      void enableBatterySaverPrompt(boolean enabled)
      设置低电量提醒框。
      Set low battery reminder box.
      void enableEthernetTether(boolean enable)
      设置以太网共享网络功能是否可用。需重启设备才能生效。
      Set whether the Ethernet shared network function is available.
      boolean enableKeyEvent()
      启用物理键盘, 仅适用于带物理键盘的终端
      enable physical keyboard, apply only to terminal with keyboard
      void enableLocation(boolean enable)
      开启或关闭定位服务。
      Turn location services on or off.
      void enableMassStorage(boolean enable)
      使能大容量存储器挂载。
      Enable mass storage mounts.
      void enableNavigationBar(boolean enable)
      设置设备是否启用导航栏。机器重启后恢复默认。默认值:启用。
      Set to enable NavigationBar or not.
      void enableNavigationKey(ENavigationKey key, boolean enable)
      设置设备是否启用目标按键 。机器重启后恢复默认。默认值:启用。
      Set to enable NavigationKey or not.
      void enablePowerKey(boolean enable)
      设置设备是否启用电源键 。机器重启后恢复默认。默认值:启用。
      Set to enable PowerKey or disable.
      void enableScreenSaver(boolean enable)
      设置屏保是否可用。
      Set whether the screensaver is available.
      void enableScreenshot(boolean enable)
      关闭开启系统截图功能。
      Disable or enable the system screenshot function.
      void enableShortPressPowerKey(boolean enable)
      禁用或者启用短按电源键熄屏。设备重启恢复默认。
      Disable or enable short press the power button to turn off the screen.
      void enableShutdownConfirm(boolean enable)
      长按电源键弹出密码框,输入密码后才进去"关机/重启"界面,不输入30秒后消失。
      Long press the power button to pop up the password box, enter the "shutdown/restart" interface after entering the password, and disappear after 30 seconds.
      void enableStatusBar(boolean enable)
      设置设备是否启用状态栏。机器重启后恢复默认。默认值:启用。
      Set to enable stautusBar or disable.
      void enableSystemOTA(boolean enable)
      设置是否启用系统OTA通道。
      Sets whether the system OTA channel is enabled.
      void enableUsbPermissionDialog(boolean enable)
      设置是否显示USBDevice和USBAccessory权限弹框。
      Set whether to show USBDevice and USBAccessory permissions dialog.
      void enableVolumeKey(boolean enable)
      设置是否启用音量键。机器重启后恢复默认。默认值:启用。
      Sets whether the volume key is enabled.
      boolean enableWiFiDHCP()
      启用Wi-Fi使用DHCP连接。
      Enable Wi-Fi using DHCP connection.
      java.lang.String getAgpsServerDomain()
      获取AGPS服务器的域名。
      Get the domain name of the AGPS server.
      int getAntMode()
      获取天线模式
      get antenna mode
      int getAppLogs(java.lang.String storePath, java.lang.String startDate, java.lang.String endDate)
      获取指定时间段的系统日志
      Gets the app logs through the specified time range
      java.util.List<java.lang.String> getAppsWhitelist(byte[] pubKey, ASCaller caller)
      获取应用白名单,白名单中的应用不能卸载。
      Get application whitelist.
      BaseInfo getBaseInfo()
      读取底座信息.
      read base information
      java.lang.String getCurrentKeyboardLayoutForInputDevice()
      获取当前物理键盘布局
      get the current physical keyboard layout
      java.lang.String getCustomerResVer()
      获取客户资源包版本。
      Get the customer resource version.
      java.lang.String getDate()
      读取终端日期和时间。
      Get terminal date and time.
      java.lang.String getDefaultLauncherActivityName()
      获取系统默认桌面的Activity的名字。
      Get the system default launcher activity name
      java.lang.String getDefaultLauncherPackageName()
      获取系统默认桌面包名
      Get the system default launcher package name
      int getDeviceTamperInfo()
      获取设备是否触发
      Obtain whether the device is triggered
      java.lang.String getDevInterfaceVer()
      获取设备接口版本号
      Get the version of device interface
      java.lang.String getEcmStaticIP()
      获取ECM静态IP。
      Get ECM static IP.
      int getEthernetSpeedLimit()
      获取ethernet当前的限制速度
      get the current limiting speed of ethernet
      java.lang.String getInterceptorVersion()
      获取读卡器拦截器的版本。
      Gets the version of the reader interceptor.
      boolean getLockTerminalStatus(byte[] pubKey, ASCaller caller)
      查询终端锁定的状态。
      get the lock status of a terminal.
      NtpServerParam getNTPServerParam()
      获取NTP服务器和超时时间。需在AndroidManifest中添加权限:"com.pax.permission.NTP"。
      Get NTP server and timeout.
      int getPedMode()
      获取PED模式
      get PED mode
      java.lang.String getPN()
      获取PN号
      get device PN
      byte[] getRandom(int len)
      系统产生len字节的随机数
      Generating random number of len bytes.
      java.lang.String getRebootTime()
      获取24小时重启的时间点
      Get a 24-hour reboot time
      boolean getRebootTimeEnabled()
      获取定时重启开关的状态
      Get the status of the scheduled reboot switch
      int getScreenBrightness()
      获取屏幕亮度
      get screen brightness
      int getScreenOffTime()
      获取屏幕休眠时间。
      Get the screen off time
      int getScreenRotation()
      获取屏幕旋转的角度
      Gets the Angle at which the screen rotates
      java.lang.String getScreenSaver()
      获取屏保应用的包名。
      Gets the package name of the screensaver.
      int getSecScreenBrightness()
      获取副屏屏幕亮度。
      Get the screen brightness of the secondary screen.
      android.os.Bundle getSecurityInfo()
      获取安全相关的版本信息。
      Get security-related version information.
      boolean getShowBatteryLevel()
      获取电池电量百分比开关状态。
      Obtain the battery percentage switch status.
      java.lang.String getSystemComponentVersion(java.lang.String componentName)
      获取设备相关版本信息
      Obtain device-related version information
      java.lang.String getSystemLanguage()
      获取系统语言
      get system language
      java.util.Map<ETermInfoKey,java.lang.String> getTermInfo()
      获取终端信息
      Get terminal information
      byte[] getTermInfoExt()
      获取扩展终端信息。必须要添加权限:"android.permission.READ_PHONE_STATE"权限。
      格式:xml
      get external terminal info.
      java.lang.String getTetheringIp(int iface)
      获取USB tethering 子网的IP信息。
      Get IP information of USB tethering subnet.
      boolean getTpWakeupEnable()
      获取TP唤醒功能开关状态。
      Get the status of TP Wake up switch.
      int getUsbMode()
      获取当前USB模式。如果开启权限检查,需在AndroidManifest下添加以下权限:"com.pax.permission.USB_SECURITY"
      Get the current USB mode.
      LanParam getUsbVirtualEthConfig(java.lang.String iface)
      获取以太网IP地址信息。
      Get USB virtual Ethernet configuration.
      int getWiFiHotspotStatus()
      获取Wi-Fi热点状态。
      Get Wi-Fi hotspot status.
      void goToSleep()
      强制设备进入休眠状态。
      Force the device to sleep.
      int installApp(java.lang.String path)
      静默安装应用 。如果开启权限检查,需在AndroidManifest下添加以下权限:"com.pax.permission.UPDATE_APP"。
      install app.
      boolean installWifiCertificate(byte[] cert, java.lang.String certName, boolean isP12, java.lang.String certPwd)
      安装wifi证书,需申请权限"com.pax.permission.WIFICERT_INSTALL"。
      To install the wifi certificate, add the following permissions under AndroidManifest :"com.pax.permission.WIFICERT_INSTALL".
      boolean isAutomaticBrightness()
      获取是否自动调节亮度模式
      Get whether to automatically adjust brightness mode
      boolean isAutomaticRotation()
      获取屏幕自动旋转状态
      Gets the automatic screen rotation status.
      boolean isAutoTime()
      获取自动确定时间和日期是否开启。
      Gets whether the time and date are enabled automatically.
      boolean isAutoTimeZone()
      获取自动确定时区是否开启。
      Gets the automatic determination of whether the time zone is open.
      boolean isDebug() 
      boolean isNavigationBarEnabled()
      判断设备是否启用导航栏
      To check is the NavigationBar enable or disable
      boolean isNavigationBarVisible()
      判断设备是否显示导航栏
      To check is NavigationBar visible or invisible
      boolean isNavigationKeyEnabled(ENavigationKey key)
      判断设备是否启用目标按键
      To check is the NavigationBar enable or disable
      boolean isOnBase()
      获取底座是否在位。
      Whether or not the base is in position.
      boolean isPowerKeyEnabled()
      判断设备是否启用电源键
      To check is the PowerKey enable or disable
      boolean isShortPressPowerKeyDisabled()
      获取短按电源键是否被禁用
      Gets whether short press of the power button is disabled
      boolean isSoundEffectsEnabled()
      获取触摸提示音是否开启
      get whether the touch sound is enabled
      boolean isStatusBarEnabled()
      判断设备是否启用状态栏
      To check is the NavigationBar enable or disable
      boolean isStatusBarVisible()
      判断设备是否显示状态栏
      To check is StatusBar visible or invisible
      boolean isSystemOTAEnable()
      判断系统OTA通道是否启用。
      Determine whether the system OTA channel is enabled.
      boolean isUsbHostDisabled()
      获取是否禁用USB外设的状态。
      Gets the status of whether to disable USB peripherals.
      boolean isVolumeKeyEnable()
      判断音量键是否启用。
      Check whether the volume key is enabled.
      void ledControl(byte ledIndex, byte mode)
      控制4盏LED灯的亮灭状态 提示: 目前仅支持A60、A910、A920、Aries6、Aries8、E500,其中E500只能控制蓝灯
      Control 4 LED lights on and off status reminder: currently only support A60, A920, A920, Aries6, Aries8, E500, of which E500 can only control blue light
      void lightControl(byte type, byte mode)
      控制设备提示灯
      Control device notify light
      void lockTerminal(byte[] pubKey, ASCaller caller)
      锁定终端。
      lock the terminal.
      java.lang.String readTUSN()
      读取终端系统的银联唯一序列号.
      read TUSN
      void reboot()
      重启
      Set to reboot the device
      void removeRecentTasks(java.util.List<java.lang.String> excludePackageNames)
      清除最近使用的程序列表。
      Clears the list of recently used programs.
      void reset()
      恢复出厂设置 需在AndroidManifest下添加以下权限:"com.pax.permission.RESET"
      To restore factory Settings, you need to add the following permissions in the AndroidManifest :"com.pax.permission.RESET"
      void resetNetworkSettings()
      重置网络设置。包括:Wi-Fi,移动数据,蓝牙。
      Reset network settings.
      void resetStatusBar()
      Deprecated.  
      boolean set24Hour(boolean is24Hour)
      设置时间24小时制。
      Set time 24-hour clock.
      void setAccessibilityDisplayDaltonizerEnabled(boolean enable)
      设置是否打开无障碍-色彩校正。
      Set whether to turn on Accessibility - Color correction.
      void setAccessibilityDisplayInversionEnabled(boolean enable)
      设置是否打开无障碍-颜色反转。
      Set whether to turn on Accessibility - Color inversion.
      void setAgpsServerDomain(java.lang.String domainName)
      设置AGPS服务器的域名。
      Set the domain name of the AGPS server.
      void setAntMode(int antMode)
      设置天线模式
      set antenna mode
      void setApplicationNeedPassword(java.lang.String pkgName, java.lang.String password)
      设置启动应用密码。
      Set the password for starting the application.
      void setAppPowerSaveConfigWithType(java.lang.String packageName, boolean on)
      打开或者关闭设置—电池—更多设置—应用待机优化中的应用优化开关
      Turn on or off Settings - Battery - More Settings - Application Optimization switch in Application Standby Optimization
      void setAppsWhitelist(byte[] pubKey, byte[] whitlist, ASCaller caller)
      设置应用白名单,会覆盖之前的应用白名单。白名单中的应用不能卸载。
      Setting the application whitelist, overrides previous application whitelist.
      void setAppSwitchListener(boolean isOpen, IAppSwitchListener listener)
      设置监听应用。
      Set application switch listener.
      void setAutoAdaptionModeNotificationSilent(boolean flag)
      在设置->电池工作模式的自适应模式下,终端自动切换为桌面模式后,充电到80%时会停止充电并发送停充通知,控制停充通知是否静音。
      In the adaptive mode of setting -> Battery working mode, after the terminal automatically switches to desktop mode, it will stop charging and send a stop charging notification when charging reaches 80%.
      boolean setAutomaticRotation(boolean isAutomaticRotation)
      设置屏幕自动旋转
      Set automatic screen rotation
      void setBatteryManagerEnable(boolean enable)
      打开或关闭电池管理器
      Turn on or off the battery manager
      void setBootAnimation(java.lang.String filePath)
      设置开机动画。注意:必须有固件签名。
      Set boot animation.
      void setBootLogo(java.lang.String filePath)
      设置开机Logo。注意:必须有固件签名。
      Set the boot logo.
      void setBrightnessMode(boolean isAutomatic)
      设置自动调节亮度模式
      Set the automatic brightness mode
      void setChargeLimit(boolean limit)
      控制充电控制机制。开启该机制后,充电范围控制在15%-35%,电量低于15%复充,超过35%停止。
      Control the charging limit.
      boolean setChargerScreenDisabled(boolean disable)
      是否允许关机时接入适配器自动开机。
      Whether to allow the access adapter to turn on automatically when shutdown.
      void setCurrentKeyboardLayoutForInputDevice(java.lang.String keyboardLayoutDescriptor)
      设置当前物理键盘布局
      set the current physical keyboard layout
      void setDate(java.lang.String date)
      设置系统的日期和时间,星期值将自动算出并设置。
      Setting the system date and time.
      void setDefaultDns(java.lang.String dns1, java.lang.String dns2)
      用于设置默认DNS,调用接口后需要断开网络,再重新连接网络才能生效,例如:调用接口后需要先关闭移动数据开关, 然后再打开移动数据流量开关。WIFI也是如此,需要断开当前WiFi连接然后重连才能生效。
      This parameter is used to set the default DNS.
      void setDefaultLauncher(boolean unconditional)
      设置允许系统启动“默认桌面”,而不弹出选择对话框,即使有几个桌面。
      Set startup "Default Launcher".
      void setDisplaySize(int mode)
      设置显示大小。
      Set display size.
      void setDoubleTapKeyboardPlaySoundCustomized(boolean enabled)
      设置是否由应用播放盲人键盘语音提示。
      Set whether the application plays voice prompts for the blind keyboard.
      boolean setEcmStaticIP(java.lang.String ipAddress, int networkPrefixLength)
      设置ECM静态IP(设备必须已经是"USB ECM网络共享模式")。
      Set ECM static IP (device must already be in "USB ECM tethering mode").
      boolean setEthernetSpeedLimit(int speed)
      设置ethernet的限制速度
      set the limit speed of ethernet
      void setFontScale(int font)
      设置字体大小
      Set font size
      void setGuestKeyBoardType(int type)
      设置客显屏显示PIN键盘
      Set the guest display screen to show the PIN keyboard
      void setHighTextContrastEnabled(boolean enable)
      设置是否打开无障碍-界面高对比度文字。
      Set whether Accessibility is turned on - Interface high contrast text.
      void setInfoCollect(boolean enable)
      设置终端信息收集
      Set terminal information collection
      void setLauncher(java.lang.String packageName, java.lang.String activityName, boolean unconditional)
      设置Launcher。
      Set the launcher.
      void setLoadRecentTasks(boolean enable)
      设置是否加载最近任务列表
      若设置为加载,则设备重启后可显示关机前的任务记录。若设置为不加载,则显示为空
      Set whether to load the recent task list
      If set to load, the task records before shutdown are displayed after the device is restarted.
      boolean setLocationMode(int mode)
      设置GPS定位模式。
      Set GPS positioning mode.
      void setLongPowerKeyDisable(boolean disable)
      禁用或启用Power键长按关机功能
      To disable or enable the power-off function, hold down the Power key
      boolean setNTPServerParam(NtpServerParam param)
      设置NTP服务器和超时时间。需在AndroidManifest中添加权限:"com.pax.permission.NTP"。
      Set NTP server and timeout.
      void setPowerSaveMode(int mode)
      设置省电模式 注:仅适用于展讯平台的产品
      Set power saving mode Note: Only applicable to Spreadtrum platform products
      void setPrivateDns(java.lang.String dns)
      用于设置Settings—Network & internet—PrivateDns菜单中的私人DNS主机名
      Used to set the private DNS hostname in the Settings - Network & internet - PrivateDns menu
      void setQuickLaunch(java.lang.String name, java.lang.String value)
      设置快捷启动方式。
      Set up a quick launch method.
      void setRebootMode(byte mode)
      设置Reboot重启模式。
      Set reboot mode.
      void setRebootTime(java.lang.String time)
      设置24小时重启的时间点
      当调用接口设置一个新的重启时间点后,会立刻生效,按更新的设置时间点重启。
      Set a 24-hour reboot time
      When calling the interface to set a new restart time point, it will take effect immediately, and restart according to the updated set time point.
      void setRebootTimeEnable(boolean enable)
      设置固定时间点重启
      Enable or disable reboot at a fixed time
      void setScanResultMode(int mode)
      设置快捷键扫码结果处理模式。
      Set the shortcut key to scan the result processing mode.
      void setScreenBrightness(int level)
      设置屏幕亮度
      set screen brightness
      void setScreenOffTime(int millisecond)
      设置屏幕休眠时间。到了休眠时间,如果有安装屏保程序,显示屏保,如果没有屏保程序,息屏。
      Set the screen off time.
      boolean setScreenRotation(int rotation)
      设置屏幕旋转角度
      Set the screen rotation Angle
      void setScreenSaver(java.lang.String packageNmae, java.lang.String component)
      设置屏保程序。
      Set up the screen saver.
      void setScreenSaverActivateType(int type)
      设置屏保激活类型。
      Set the screen saver activation type.
      void setScreenSaverTime(int millisecond)
      设置屏保显示时间。
      Set screen saver display time.
      void setSecScreenBrightness(int brightness)
      设置副屏屏幕亮度。
      Set the screen brightness of the secondary screen.
      void setSettingsNeedPassword(boolean need)
      设置进入设置界面时是否需要密码。如果报不支持异常,请使用setSettingsNeedPassword(byte[], boolean, ASCaller)
      Set is password needed to access setting.
      void setSettingsNeedPassword(byte[] pubKey, boolean need, ASCaller caller)
      设置进入设置界面时是否需要密码。
      Set whether a password is required when entering the setting.
      void setSettingsPassword(byte[] pubKey, java.lang.String password, ASCaller caller)
      修改系统“设置”应用的密码。长度至少7位,至少包含三个数字,三个字母,和一个特殊符号。调用高级权限接口需要传入签名公钥和ASCaller参数。
      Change the password for the system Settings application.At least 7 digits in length, including at least three Numbers, three letters, and a special symbol.
      void setShortcutAction(java.lang.String action)
      自定义快捷键跳转到 action 指定的界面。
      Customize the shortcut key to jump to the specified action interface.
      boolean setSmartSavingModeWhenCharging(boolean config)
      设置充电时是否退出省电模式。
      Set whether to exit the power saving mode during charging.
      void setSoundEffectsEnabled(boolean enabled)
      设置是否开启触摸提示音
      set whether to enable the touch sound
      int setSystemLanguage(java.util.Locale locale)
      设置系统语言
      set system language
      void setTetheringIp(int iface, java.lang.String ip)
      设置USB tethering的子网。
      Set the subnet for USB tethering.
      void setTimeZone(java.lang.String timeZone)
      设置时区
      set time zone
      void setTpWakeupEnable(boolean enable)
      设置TP唤醒是否打开。注:功能需要重启生效。
      Set whether TP wake-up is enabled.
      void setUsbHostDisable(boolean disable)
      设置是否禁用USB外设。
      Set whether to disable USB peripherals.
      void setUsbMode(int mode)
      设置USB模式。如果开启权限检查,需在AndroidManifest下添加以下权限:"com.pax.permission.USB_SECURITY"
      Set USB mode.
      void setUsbVirtualEthConfig(java.lang.String iface, LanParam param)
      设置usb虚拟以太网配置。
      Set USB virtual Ethernet configuration.
      boolean setWifiStaticIp(java.lang.String ip, java.lang.String gateway, int networkPrefixLength, java.lang.String dns1, java.lang.String dns2, boolean reconnect)
      设置wifi静态IP。wifi网络必须已连接。
      Set wifi static IP.
      void setWifiWakeupEnabled(boolean enable)
      设置自动开启 WLAN功能
      The WLAN function is enabled automatically
      void showCarrierName(boolean enable)
      设置是否在状态栏上显示运营商名称 注:重启后生效
      Whether to display the carrier name in the status bar Note: This parameter takes effect after the restart
      void showCustomizedPowerOffUI(boolean enable)
      使用客制化关机界面
      Use the customized power off UI
      void showNavigationBar(boolean show)
      设置设备是否显示导航栏。机器重启后恢复默认。默认:显示。
      Set to show NavigationBar or not.
      void showStatusBar(boolean show)
      设置设备是否显示状态栏。机器重启后恢复默认。 默认:显示。
      Set to show stautusBar or not.
      void shutdown()
      关机
      Set to shutdown the device
      boolean switchPrintService(android.content.Context context, java.lang.String pkg, java.lang.String cls, boolean onOff)
      打开或者关闭打印服务
      Turn on or off the print service
      void switchPrivateDNSMode(int mode)
      切换私人DNS模式
      Switch to the private DNS mode
      boolean switchSimCard(int num)
      切换sim卡
      switch sim card to another.
      void switchTouchMode(ETouchMode touchMode)
      更改设备触摸模式
      set touch mode to device
      boolean turnOffWiFiHotspot()
      关闭Wi-Fi热点。
      Turn off the Wi-Fi hotspot.
      boolean turnOnWiFiHotspot(java.lang.String ssid, java.lang.String preShareKey, int keyManagement)
      开启Wi-Fi热点。
      Turn on the Wi-Fi hotspot.
      boolean turnOnWiFiHotspot(java.lang.String ssid, java.lang.String preShareKey, int keyManagement, int channel)
      开启Wi-Fi热点。
      Turn on the Wi-Fi hotspot.
      int uninstallApp(java.lang.String packgeName)
      静默卸载应用 。如果开启权限检查,需在AndroidManifest下添加以下权限:"com.pax.permission.UPDATE_APP"。
      uninstall app.
      void unlockTerminal(byte[] pubKey, ASCaller caller)
      解锁终端。
      unlock the terminal.
      void updateBootAnimation(java.lang.String fileName)
      下载客户私钥签名的开机动画,注意:开机动画大小不超过30M
      Download the power-on animation signed by the customer's private key.
      void updateBootLogo(java.lang.String fileName)
      下载客户私钥签名的开机LOGO,注意:开机LOGO大小不超过30M
      Download the startup LOGO signed by the customer's private key,Note: Boot LOGO size does not exceed 30M
      int updateFirmware(java.lang.String path)
      更新固件。如果开启权限检查,需在AndroidManifest下添加以下权限:"com.pax.permission.UPDATE_FIRM"。
      update firmware.
      void updateSettingsPasswordHashValue(byte[] pubKey, java.lang.String sha256, ASCaller caller)
      更新Setting应用的密码
      Update the password of Setting
      void updateSystemTimeZoneData(java.lang.String filePath)
      更新设备的时区数据
      注意:调用后需重启设备才能生效。
      Update the time zone data of the device
      Note: The call takes effect only after the device is restarted.
      int updateTTSVoices(int mode, java.lang.String path)
      下载TTS离线语音文件
      Download the TTS offline voice file
      int updateTTSVoices(java.lang.String zipFilePath)
      下载TTS离线语音文件
      Download the TTS offline voice file
      boolean verifySign(int pukType, java.lang.String fileAbsPath)
      文件验签。
      Verify the file signature.
      int verifySign(java.lang.String filePath, int fileType, int pukType, byte[] puk)
      应用配置文件和脚本文件的验签。
      Verification of application configuration files and script files.
      void writeCSN(java.lang.String csn)
      写CSN
      write customer serial number
      void writeCustomerResConfig(java.lang.String filePath)
      写入应用签名或固件签名的文件。注意:写入的文件需要符合CustomerResConfig给出的规范, 且有应用签名或固件签名,写入文件成功后, 配合资源包使用, 重启机器, 即可让xml文件中的需求生效。
      Write application signature or firmware signature file.
    • Method Detail

      • beep

        int beep(java.lang.String params)
        按频率参数列表发声
        beep with the list of frequency parameters
        Parameters:
        params -
        频率列表的格式为“频率:时长;频率:时长…”。音频频率单位为赫兹, 有效范围为(A920mini/A50/A77: 50~4000;A30/A8300/A910S/A920PRO/P100/A920: 50-2750;other: 50-3000), 时长单位为毫秒,有效范围为0~65535。最多支持100组频率。频率列表参数为“750:100;1500:200”, 表示以750赫兹播放100毫秒,然后以1500赫兹播放200毫秒。
        The format of the frequency list is "frequency: duration; frequency: duration...". The unit of audio frequency is Hertz, The valid range is (A920mini/A50/A77: 50~4000; A30/A8300/A910S/A920PRO/P100/A920: 50-2750; other: 50-3000), The duration unit is milliseconds, and the valid range is 0~65535. Supports up to 100 groups of frequencies. The frequency list parameters are "750:100; 1500:200", which means playing at 750 Hz for 100 milliseconds, and then playing at 1500 Hz for 200 milliseconds.
        Returns:
        0:成功 其他失败
        • -1:Audio file is not exist, or frequence list invalid
        • -2:Audio format is not supported
        • -3:The system volume is zero
        • -4:Device busy
        • 98:parameter invalid
        • 99:RPC I/O error
        • 100:Not Support for this device
        • 102:Rpc busy
        0:success other:failed
        • -1:Audio file is not exist, or frequence list invalid
        • -2:Audio format is not supported
        • -3:The system volume is zero
        • -4:Device busy
        • 98:parameter invalid
        • 99:RPC I/O error
        • 100:Not Support for this device
        • 102:Rpc busy
        Since:
        V2.03.00
      • checkPermission

        boolean checkPermission(java.lang.String packageName,
                                java.lang.String usesPermission)
        判断设备操作权限
        To check whether APK has operating permission by given device
        Parameters:
        packageName -
        应用包名
        package name
        usesPermission -
        权限名
        uses permission name
        Returns:
        成功 -true 失败 -false
        success -true failed -false
      • disableKeyEvent

        boolean disableKeyEvent()
        禁用物理键盘, 仅适用于带物理键盘的终端
        disable physical keyboard, apply only to terminal with keyboard
        Returns:
        true:成功;false:失败。
        True:success; False:failure.
      • enableADBAndMTP

        boolean enableADBAndMTP(boolean enable)
        设置是否允许ADB和MTP。如果开启权限检查,需在AndroidManifest下添加以下权限: "com.pax.permission.USB_SECURITY"
        Set whether to allow ADB and MTP.If permission checking is enabled, add the following permissions under AndroidManifest :"com.pax.permission.USB_SECURITY"
        Parameters:
        enable -
        true:允许使用ADB和MTP;false:禁用ADB和MTP
        True: enable ADB and MTP;False: disable ADB and MTP
        Returns:
        true:成功;false:失败
        True: success;False: failure
        Since:
        V3.06.00
      • enableKeyEvent

        boolean enableKeyEvent()
        启用物理键盘, 仅适用于带物理键盘的终端
        enable physical keyboard, apply only to terminal with keyboard
        Returns:
        true:成功;false:失败。
        true:success; false:failure.
      • enableNavigationBar

        void enableNavigationBar(boolean enable)
        设置设备是否启用导航栏。机器重启后恢复默认。默认值:启用。
        Set to enable NavigationBar or not. Restore the default when the machine is restarted. Default: enabled.
        Parameters:
        enable -
        true:可用;false:禁用。
        true:enable; false:disable.
      • enableNavigationKey

        void enableNavigationKey(ENavigationKey key,
                                 boolean enable)
        设置设备是否启用目标按键 。机器重启后恢复默认。默认值:启用。
        Set to enable NavigationKey or not. Restore the default when the machine is restarted. Default: enabled.
        Parameters:
        key - ENavigationKey
        按键
        NavigationKey
        • BACK - key for back
        • HOME - key for home
        • RECENT - key for recent
        enable -
        启用或者不启用
        true or false
      • enablePowerKey

        void enablePowerKey(boolean enable)
        设置设备是否启用电源键 。机器重启后恢复默认。默认值:启用。
        Set to enable PowerKey or disable. Restore the default when the machine is restarted. Default: enabled.
        Parameters:
        enable -
        • true -- 启用
        • false -- 不启用
        • true -- enable
        • false -- disable
      • enableStatusBar

        void enableStatusBar(boolean enable)
        设置设备是否启用状态栏。机器重启后恢复默认。默认值:启用。
        Set to enable stautusBar or disable. Restore the default when the machine is restarted. Default: enabled.
        Parameters:
        enable -
        • true -- 启用
        • false -- 不启用
        • true -- enable
        • false -- disable
      • getAppLogs

        int getAppLogs(java.lang.String storePath,
                       java.lang.String startDate,
                       java.lang.String endDate)
        获取指定时间段的系统日志
        Gets the app logs through the specified time range
        Parameters:
        storePath -
        Log storage path
        Log storage path
        startDate -
        格式:YYYY-MM-DD
        Format:YYYY-MM-DD
        endDate -
        格式:YYYY-MM-DD
        Format:YYYY-MM-DD
        Returns:
        0:成功 -1:失败
        0:success -1:faulire
      • getDate

        java.lang.String getDate()
        读取终端日期和时间。
        Get terminal date and time.
        Returns:
        格式 YYYYMMDDhhmmssEE (比如:"2013060617373704" = Thu Jun 06 17:37:37 CST 2013)
        Format: YYYYMMDDhhmmssEE(for example:"2013060617373704" = Thu Jun 06 17:37:37 CST 2013)
      • getDevInterfaceVer

        java.lang.String getDevInterfaceVer()
        获取设备接口版本号
        Get the version of device interface
        Returns:
        设备接口版本号
        the version of device of interface
      • getPedMode

        int getPedMode()
        获取PED模式
        get PED mode
        Returns:
        • 1.共享模式,可使用模块:IPed、IPedKeyIsolationMixedManager。
        • 2.隔离模式,可使用模块:IPedKeyIsolation。该模式已经不再维护,请升级固件使用新密钥隔离模式。
        • 3.混合模式,可使用模块:IPed、IPedKeyIsolation。该模式已经不再维护,请升级固件使用共享模式的的IPedKeyIsolationMixedManager。
        • 4.新隔离模式,可使用模块:IPedKeyIsolationManager。
        • 1.Shared mode, available modules: IPed、IPedKeyIsolationMixedManager.
        • 2.Isolation mode, available modules: IPedKeyIsolation. This mode has been deprecated, please upgrade the firmware to use enhanced isolation mode.
        • 3.Mixed mode, available modules: IPed、IPedKeyIsolation. This mode has been deprecated, please upgrade the firmware to use the shared mode IPedKeyIsolationMixedManager.
        • 4.Enhanced isolation mode, available modules: IPedKeyIsolationManager.
        Since:
        V2.02.00
      • getPN

        java.lang.String getPN()
        获取PN号
        get device PN
        Returns:
        PN
        Since:
        V3.01.00
      • getRandom

        byte[] getRandom(int len)
        系统产生len字节的随机数
        Generating random number of len bytes.
        Parameters:
        len -
        产生随机数的字节数[0-65535]
        the length for generating random number [0-65535]
        Returns:
        随机数组
        Random bytes array.
      • getSystemLanguage

        java.lang.String getSystemLanguage()
        获取系统语言
        get system language
        Returns:
        当前系统语言
        system language
        Since:
        V3.00.00
      • getTermInfoExt

        byte[] getTermInfoExt()
        获取扩展终端信息。必须要添加权限:"android.permission.READ_PHONE_STATE"权限。
        格式:xml
        get external terminal info. Permissions must be added:"android.permission.READ_PHONE_STATE".
        format:xml
        Returns:
        终端扩展信息。XML格式,为2级标签,格式如下:<root> <tagname1>value1</tagname1> <tagname2>value2</tagname2>....</root> 标签列表如下表:
        标签名 数据格式 说明
        flashsize ASCII Flash 大小,格式: XXXXMB。
        rfchip ASCII 射频卡模块类型,格式: XX。
        printer ASCII 打印机型号,格式: XX。
        RAMSize ASCII RAM 大小,格式: XXXXKB。
        tidkeystate ASCII TIDKey状态: 0-未上传 1-已上传 2-系统不支持SN KEY。
        securityinfo ASCII 安全固件版本信息。
        Terminal extends information.The XML format is level 2 label, and the format is as follows: <root> <tagname1>value1</tagname1> <tagname2>value2</tagname2>....</root> The list of tags is as follows:
        Tag name Data format Description
        flashsize ASCII Flash size, format: XXXXMB.
        rfchip ASCII Rf card module type, format: XX.
        printer ASCII Printer model, format: XX.
        ramsize ASCII RAM size, format: XXXXKB.
        tidkeystate ASCII TIDKey status: 0- unuploaded 1- uploaded 2- SN KEY is not supported by the system.
        securityinfo ASCII Security firmware version information.
      • installApp

        int installApp(java.lang.String path)
        静默安装应用 。如果开启权限检查,需在AndroidManifest下添加以下权限:"com.pax.permission.UPDATE_APP"。
        install app. If permission checking is enabled, add the following permissions under AndroidManifest : "com.pax.permission.UPDATE_APP".
        Parameters:
        path -
        安装包绝对路径
        apk absolute path
        Returns:
        0:成功 其他失败
        • -103:INSTALL_PARSE_FAILED_NO_CERTIFICATES:安装包中没有解析到任何证书。
        • -99:缺少更新权限错误
        • -26:INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE:原应用编译的target SDK版本大于22,升级应用编译的target SDK版本不大于22
        • -25:低版本应用覆盖高版本错误
        • -22:安装验签失败
        • -21:文件不可读或不存在
        • -7:UPDATE_CUSTOMER_ERR:表示以前安装的同名包与新包的签名不同
        • 1:通用异常,服务不可用错误
        0:success other:failed
        • -103:INSTALL_PARSE_FAILED_NO_CERTIFICATES:if the parser did not find any certificates in the .apk.
        • -99:UPDATE_PERMISSION_ERROR
        • -26:INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE:The target SDK version compiled by the original application is greater than 22, and the target SDK version compiled by the upgraded application is not greater than 22.
        • -25:INSTALL_FAILED_VERSION_DOWNGRADE
        • -22:INSTALL_FAILED_VERIFICATION_FAILURE
        • -21:FILE_NOT_READ_EXIST
        • -7:UPDATE_CUSTOMER_ERR:Indicates that the previously installed package of the same name has a different signature from the new package
        • 1:SERVICE_NOT_AVAILABLE
        Since:
        V2.03.00
      • isDebug

        boolean isDebug()
        Returns:
        true:终端为Debug状态 ;false:终端为Release状态
        true: debug status; false:release status
      • isNavigationBarEnabled

        boolean isNavigationBarEnabled()
        判断设备是否启用导航栏
        To check is the NavigationBar enable or disable
        Returns:
        • true -- 可用
        • false -- 不可用
        • true -- enable
        • false -- disable
      • isNavigationBarVisible

        boolean isNavigationBarVisible()
        判断设备是否显示导航栏
        To check is NavigationBar visible or invisible
        Returns:
        • true -- 显示
        • false -- 隐藏
        • true -- visible
        • false -- invisible
      • isOnBase

        boolean isOnBase()
        获取底座是否在位。
        Whether or not the base is in position.
        Returns:
        true:在位; false:不在位;
        true:in position; false:not in position;
        Since:
        V2.03.00
      • isPowerKeyEnabled

        boolean isPowerKeyEnabled()
        判断设备是否启用电源键
        To check is the PowerKey enable or disable
        Returns:
        *
        • true -- 启用
        • false -- 未启用
        *
        • true -- enable
        • false -- disable
      • isStatusBarEnabled

        boolean isStatusBarEnabled()
        判断设备是否启用状态栏
        To check is the NavigationBar enable or disable
        Returns:
        • true -- 启用
        • false -- 不启用
        • true -- enable
        • false -- disable
      • isStatusBarVisible

        boolean isStatusBarVisible()
        判断设备是否显示状态栏
        To check is StatusBar visible or invisible
        Returns:
        • true -- 显示
        • false -- 隐藏
        • true -- visible
        • false -- invisible
      • ledControl

        void ledControl(byte ledIndex,
                        byte mode)
        控制4盏LED灯的亮灭状态 提示: 目前仅支持A60、A910、A920、Aries6、Aries8、E500,其中E500只能控制蓝灯
        Control 4 LED lights on and off status reminder: currently only support A60, A920, A920, Aries6, Aries8, E500, of which E500 can only control blue light
        Parameters:
        ledIndex -
        LED灯的索引号
        • BIT0 红灯
        • BIT1 绿灯
        • BIT2 黄灯
        • BIT3 蓝灯
        • BIT4~BIT7 保留
        LED light index
        • BIT0 red light
        • BIT1 green light
        • BIT2 yellow light
        • BIT3 blue light
        • BIT4~BIT7 reserve
        mode -
        0: 熄灭 1: 点亮 2:闪烁(暂未实现)
        0: light off 1: light on 2:twinkle(Temporarily unrealized)
        Since:
        V3.01.00
      • lightControl

        void lightControl(byte type,
                          byte mode)
        控制设备提示灯
        Control device notify light
        Parameters:
        type -
        type - 提示灯类型
        • 0x01 磁卡
        • 0x02 IC卡
        • 0x03 非接卡
        • 0x04 密码键盘
        • 0x05 指纹
        • 0x06 摄像头
        • 0x07 扫码
        • 0x08 打印机
        • 0x09 MDB指示灯
        • 0x0A 呼吸灯
        type - notifyLight type
        • 0x01 mag card
        • 0x02 IC card
        • 0x03 RF card
        • 0x04 PED
        • 0x05 fingerprint
        • 0x06 Camera
        • 0x07 scanner
        • 0x08 printer
        • 0x09 MDB status indicator
        • 0x0A Breathing lamp
        mode -
        指示灯模式
        高4位:指示灯的索引,默认为 0
        低4位:0 关闭 1 打开

        具体产品型号和指示灯对应关系如下表所示:
        产品型号 指示灯类型 指示灯索引
        PX7A 磁卡(0x01) 0:绿灯 1:红灯
        PX7A IC卡(0x02) 0:绿灯 1:红灯
        PX7A 非接卡(0x03) 0:logo提示灯
        IM30 磁卡(0x01) 0:绿灯 1:红灯 2:蓝灯
        IM30 IC卡(0x02) 0:绿灯 1:红灯 2:蓝灯
        IM30 MDB状态指示灯(0x09) 0:绿灯 1:红灯 2:蓝灯
        IM30 呼吸灯 (0x0A) 0:绿灯 1:红灯 2:蓝灯
        notifyLight mode
        High 4: notifyLight index, defaults to 0.
        Low 4: 0 close 1 open

        The relationship between the specific product model and the indicator is shown in the following table:
        Product model notifyLight type notifyLight index
        PX7A mag card(0x01) 0:green light 1:red light
        PX7A IC card(0x02) 0:green light 1:red light
        PX7A RF card(0x03) 0:logo notifyLight
        IM30 mag card(0x01) 0:green light 1:red light 2: blue light
        IM30 IC card(0x02) 0:green light 1:red light 2: blue light
        IM30 MDB status indicator (0x09) 0:green light 1:red light 2: blue light
        IM30 Breathing lamp (0x0A) 0:green light 1:red light 2: blue light
        Since:
        V3.01.00
      • readTUSN

        java.lang.String readTUSN()
        读取终端系统的银联唯一序列号.
        read TUSN
        Returns:
        TUSN
        Since:
        V2.00.03
      • reboot

        void reboot()
        重启
        Set to reboot the device
      • resetStatusBar

        void resetStatusBar()
        Deprecated. 
        重置状态栏
        Reset the StatusBar
      • setDate

        void setDate(java.lang.String date)
        设置系统的日期和时间,星期值将自动算出并设置。
        Setting the system date and time. The day of week will be calculated automatically.
        Parameters:
        date -
        YYMMDDhhmmss (合法范围: 年:(20)00~(20)37; 月:1~12; 日:1~31; 小时: 0~24; 分钟和秒: 0-59).
        Pointer to date and time parameter. Format: YYMMDDhhmmss(for example:"130606173737" = Thu Jun 06 17:37:37 CST 2013) (valid range: year:(20)00~(20)37; month:1~12; date:1~31; hour: 0~24; minute and second: 0-59).
      • setSystemLanguage

        int setSystemLanguage(java.util.Locale locale)
        设置系统语言
        set system language
        Parameters:
        locale - Locale
        Returns:
        0:成功 其他:失败
        0:successful others:failed
        Since:
        V3.00.00
      • setTimeZone

        void setTimeZone(java.lang.String timeZone)
        设置时区
        set time zone
        Parameters:
        timeZone -
        格式: continent/city(eg:Asia/Shanghai)
        format: continent/city(eg:Asia/Shanghai)
        Since:
        V3.00.00
      • showNavigationBar

        void showNavigationBar(boolean show)
        设置设备是否显示导航栏。机器重启后恢复默认。默认:显示。
        Set to show NavigationBar or not. Restore the default when the machine is restarted. Default: show.
        Parameters:
        show -
        true:显示;false:隐藏。
        true:show; false:hide.
      • showStatusBar

        void showStatusBar(boolean show)
        设置设备是否显示状态栏。机器重启后恢复默认。 默认:显示。
        Set to show stautusBar or not. Restore the default when the machine is restarted. Default: show.
        Parameters:
        show -
        • true -- 可用
        • false -- 不可用
        • true -- visible
        • false -- invisible
      • shutdown

        void shutdown()
        关机
        Set to shutdown the device
      • switchSimCard

        boolean switchSimCard(int num)
        切换sim卡
        switch sim card to another.
        Parameters:
        num -
        1或者2,只支持2张sim卡
        should be 1 or 2,only support two sim cards
        Returns:
        成功返回true,否则返回false
        if success, return true, otherwise return false
        Since:
        V2.00.01
      • switchTouchMode

        void switchTouchMode(ETouchMode touchMode)
        更改设备触摸模式
        set touch mode to device
        Parameters:
        touchMode - ETouchMode
        touchMode
        • PEN -笔
        • FINGER -手指
        touchMode
        • PEN -by pen
        • FINGER -by finger
      • uninstallApp

        int uninstallApp(java.lang.String packgeName)
        静默卸载应用 。如果开启权限检查,需在AndroidManifest下添加以下权限:"com.pax.permission.UPDATE_APP"。
        uninstall app. If permission checking is enabled, add the following permissions under AndroidManifest : "com.pax.permission.UPDATE_APP".
        Parameters:
        packgeName -
        包名
        package name
        Returns:
        0:成功 其他失败
        • -101:未知错误
        • -99:缺少更新权限错误
        • -50:错误包名或类名
        • -25:低版本应用覆盖高版本错误
        • -22:安装验签失败
        • -21:文件不可读或不存在
        • -11:获取subId错误
        • -8:写modem错误
        • -7:写资源包错误
        • -6:写PUK错误
        • -5:写SP错误
        • -4:RPC open错误
        • -3:验签错误
        • -2:解压错误
        • -1:升级包错误
        • 1:服务不可用错误
        • 2:安装失败错误
        • 3:超时错误
        • 4:获取数据失败
        • 5:未设置USB安全权限
        0:success other:failed
        • -101:UPDATE_UNKNOWN_ERR
        • -99:UPDATE_PERMISSION_ERROR
        • -50:PKG_OR_CLASS_NAME_ERROR
        • -25:INSTALL_FAILED_VERSION_DOWNGRADE
        • -22:INSTALL_FAILED_VERIFICATION_FAILURE
        • -21:FILE_NOT_READ_EXIST
        • -11:GET_SUBID_ERROR
        • -8:UPDATE_MODEM_ERR
        • -7:UPDATE_CUSTOMER_ERR
        • -6:UPDATE_WRITE_PUK_ERR
        • -5:UPDATE_WRITE_SP_IMG_ERR
        • -4:UPDATE_RPC_OPEN_ERR
        • -3:UPDATE_VERIFY_ERR
        • -2:UPDATE_UNZIP_ERR
        • -1:UPDATE_PACKAGE_ERR
        • 1:SERVICE_NOT_AVAILABLE
        • 2:INSTALL_FAIL
        • 3:TIMEOUT_ERR
        • 4:READ_DATA_FAIL
        • 5:NO_USBSECURITY_PERMISSION
        Since:
        V2.03.00
      • updateFirmware

        int updateFirmware(java.lang.String path)
        更新固件。如果开启权限检查,需在AndroidManifest下添加以下权限:"com.pax.permission.UPDATE_FIRM"。
        update firmware. If permission checking is enabled, add the following permissions under AndroidManifest : "com.pax.permission.UPDATE_FIRM".
        Parameters:
        path -
        固件绝对路径
        firmware absolute path
        Returns:
        0:成功 其他失败
        • -101:未知错误
        • -99:缺少更新权限错误
        • -50:错误包名或类名
        • -25:低版本应用覆盖高版本错误
        • -22:安装验签失败
        • -21:文件不可读或不存在
        • -11:获取subId错误
        • -10:差分包版本和当前固件版本不一致或version文件不存在
        • -8:写modem错误
        • -7:写资源包错误
        • -6:写PUK错误
        • -5:写SP错误
        • -4:RPC open错误
        • -3:验签错误
        • -2:解压错误
        • -1:升级包错误
        • 1:服务不可用错误
        • 2:安装失败错误
        • 3:超时错误
        • 4:获取数据失败
        • 5:未设置USB安全权限
        0:success other:failed
        • -101:UPDATE_UNKNOWN_ERR
        • -99:UPDATE_PERMISSION_ERROR
        • -50:PKG_OR_CLASS_NAME_ERROR
        • -25:INSTALL_FAILED_VERSION_DOWNGRADE
        • -22:INSTALL_FAILED_VERIFICATION_FAILURE
        • -21:FILE_NOT_READ_EXIST
        • -11:GET_SUBID_ERROR
        • -10:The differential package version is inconsistent with the current firmware version or the version file does not exist
        • -8:UPDATE_MODEM_ERR
        • -7:UPDATE_CUSTOMER_ERR
        • -6:UPDATE_WRITE_PUK_ERR
        • -5:UPDATE_WRITE_SP_IMG_ERR
        • -4:UPDATE_RPC_OPEN_ERR
        • -3:UPDATE_VERIFY_ERR
        • -2:UPDATE_UNZIP_ERR
        • -1:UPDATE_PACKAGE_ERR
        • 1:SERVICE_NOT_AVAILABLE
        • 2:INSTALL_FAIL
        • 3:TIMEOUT_ERR
        • 4:READ_DATA_FAIL
        • 5:NO_USBSECURITY_PERMISSION
        Since:
        V2.03.00
      • writeCSN

        void writeCSN(java.lang.String csn)
        写CSN
        write customer serial number
        Parameters:
        csn -
        CSN 最大 128字节
        CSN maximum 128 bytes
      • setScreenBrightness

        void setScreenBrightness(int level)
        设置屏幕亮度
        set screen brightness
        Parameters:
        level -
        亮度等级.[0-100]
        brightness level.[0-100]
        Since:
        V3.06.00
      • switchPrintService

        boolean switchPrintService(android.content.Context context,
                                   java.lang.String pkg,
                                   java.lang.String cls,
                                   boolean onOff)
        打开或者关闭打印服务
        Turn on or off the print service
        Parameters:
        context -
        上下文
        context
        pkg -
        打印服务的包名
        Package name of the print service
        cls -
        打印服务的类名
        Class name of the print service
        onOff -
        开关,true:打开;false:关闭
        Switch, true:turn on; false:turn off
        Returns:
        结果,true:成功;false:失败
        Result, ture:success; false:fail
        Since:
        V3.07.00
      • disablePosMenu

        void disablePosMenu(java.util.Map<PosMenu,java.lang.Boolean> posMenu)
        隐藏或显示系统设置的菜单和快捷设置的开关。调用会清除上一次调用产生的效果。
        Hide or show the system settings menu and quick settings switch. The call clears the effect of the last call.
        Parameters:
        posMenu -
        菜单集合。Map.key: 菜单PosMenu; Map.value: true表示隐藏,false表示显示。
        Menu collection.Map.key:Menu, PosMenu; Map.value: true means hide, false means show.
        Since:
        V3.07.00
      • setScreenOffTime

        void setScreenOffTime(int millisecond)
                       throws java.lang.Exception
        设置屏幕休眠时间。到了休眠时间,如果有安装屏保程序,显示屏保,如果没有屏保程序,息屏。
        Set the screen off time. When it comes time to off screen, display the screensaver if you have it installed, or off screen if you don't have it.
        Parameters:
        millisecond -
        屏幕休眠时间。时间必须从“0秒、15秒、30秒、1分钟、2分钟、5分钟、10分钟、30分钟、Integer.MAX_VALUE”中选择。 0秒表示立即休眠。Integer.MAX_VALUE表示永不休眠。单位:毫秒。
        Time of off screen. Time must be chosen from "0 seconds, 15 seconds, 30 seconds, 1 minute, 2 minutes, 5 minutes, 10 minutes, 30 minutes, Integer.MAX_VALUE". 0 seconds means immediate sleep. Integer.MAX_VALUE means never sleep. unit: millisecond.
        Throws:
        java.lang.Exception
        Since:
        V3.08.00
      • getScreenOffTime

        int getScreenOffTime()
                      throws java.lang.Exception
        获取屏幕休眠时间。
        Get the screen off time
        Returns:
        屏幕休眠时间。单位:毫秒。
        The screen off time. unit:millisecond.
        Throws:
        java.lang.Exception
        Since:
        V3.08.00
      • setScreenSaverTime

        void setScreenSaverTime(int millisecond)
                         throws java.lang.Exception
        设置屏保显示时间。
        Set screen saver display time.
        Parameters:
        millisecond -
        屏保显示时间。单位:毫秒。
        Screen saver display time. unit:millsecond.
        Throws:
        java.lang.Exception
        Since:
        V3.08.00
      • setUsbMode

        void setUsbMode(int mode)
                 throws java.lang.Exception
        设置USB模式。如果开启权限检查,需在AndroidManifest下添加以下权限:"com.pax.permission.USB_SECURITY"
        Set USB mode. If permission checking is enabled, add the following permissions under AndroidManifest : "com.pax.permission.USB_SECURITY"
        Parameters:
        mode -
        协议模式。
        • 0:禁用ADB和MTP
        • 1:默认模式
        • 2:文件传输模式
        • 3:CCID(虚拟读卡器)模式
        • 4:POSVCOM(百富虚拟串口)模式
        • 5: USB tethering (RNDIS)
        • 6: USB-PC internet share (RNDIS reverse)
        • 7: USB ECM网络共享
        • 8: USB ECM-HOST网络共享
        • 9: 表示开启SDT,MTP
        • 10: USB RNDIS no tethering
        • 11: RNDIS reverse with serial
        • 注: A920 5、A920 7、A930 仅支持模式1、2、3,需要手动重启后生效
        Protocol mode.
        • 0: Disable ADB and MTP
        • 1: Default mode
        • 2: File transfer mode
        • 3: CCID(Virtual card reader)mode
        • 4: POSVCOM(POS Virtual COM Of Pax)mode
        • 5: USB tethering (RNDIS)
        • 6: USB-PC internet share (RNDIS reverse)
        • 7: USB ECM tethering
        • 8: USB ECM-HOST tethering
        • 9: SDT and MTP are enabled
        • 10: USB RNDIS no tethering
        • 11: RNDIS reverse with serial
        • Note: A9205, A9207, and A930 only support modes 1, 2, and 3, and need to be manually restarted to take effect
        Throws:
        java.lang.Exception
        Since:
        V3.08.00
      • enableUsbPermissionDialog

        void enableUsbPermissionDialog(boolean enable)
        设置是否显示USBDevice和USBAccessory权限弹框。
        Set whether to show USBDevice and USBAccessory permissions dialog.
        Parameters:
        enable -
        • true:显示弹框,手动确定是否给予权限。
        • false:不显示弹框,直接给予权限。
        • true:Show dialog, manually determine whether permission is granted.
        • false:Don't show dialog, grant permission directly.
        Since:
        V3.08.00
      • setWifiStaticIp

        boolean setWifiStaticIp(java.lang.String ip,
                                java.lang.String gateway,
                                int networkPrefixLength,
                                java.lang.String dns1,
                                java.lang.String dns2,
                                boolean reconnect)
        设置wifi静态IP。wifi网络必须已连接。
        Set wifi static IP. Wifi network must be connected..
        Parameters:
        ip -
        IP地址。
        IP address.
        gateway -
        网关。
        Gateway.
        networkPrefixLength -
        网络前缀长度。
        Network prefix length.
        dns1 -
        DNS1。
        DNS1.
        dns2 -
        DNS2
        DNS2.
        reconnect -
        是否重新连接wifi。需要重新连接才能生效。
        Whether to reconnect to wifi. A reconnection is required to take effect.
        Returns:
        结果。ture:设置成功 ;false:设置失败。
        The results. Ture: set up successfully; False: setup failed.
        Since:
        V3.08.00
      • addService

        void addService(java.lang.String name,
                        android.os.IBinder service)
        将服务添加到ServiceManager中。
        Add a service to the ServiceManager.
        Parameters:
        name -
        服务名称。
        The service name.
        service -
        服务对象。
        The service object.
        Since:
        V3.10.00
      • enableAutoTimeZone

        void enableAutoTimeZone(boolean enable)
        设置是否开启自动确定时区。
        Set whether to enable automatic time zone determination.
        Parameters:
        enable -
        true:开启;false:关闭。
        true:open; false:off.
        Since:
        V3.10.00
      • isAutoTimeZone

        boolean isAutoTimeZone()
        获取自动确定时区是否开启。
        Gets the automatic determination of whether the time zone is open.
        Returns:
        true:开启;false:关闭。
        true:open; false:off.
        Since:
        V3.10.00
      • enableAutoTime

        void enableAutoTime(boolean enable)
        设置是否开启自动确定时间和日期。
        Set whether to enable automatic determination of time and date.
        Parameters:
        enable -
        true:开启;false:关闭。
        true:open; false:off.
        Since:
        V3.10.00
      • isAutoTime

        boolean isAutoTime()
        获取自动确定时间和日期是否开启。
        Gets whether the time and date are enabled automatically.
        Returns:
        true:开启;false:关闭。
        true:open; false:off.
        Since:
        V3.10.00
      • setScreenSaver

        void setScreenSaver(java.lang.String packageNmae,
                            java.lang.String component)
        设置屏保程序。
        Set up the screen saver.
        Parameters:
        packageNmae -
        包名。
        The package name.
        component -
        服务的类名。
        The class name of the service.
        Since:
        V3.10.00
      • setSettingsPassword

        void setSettingsPassword(byte[] pubKey,
                                 java.lang.String password,
                                 ASCaller caller)
        修改系统“设置”应用的密码。长度至少7位,至少包含三个数字,三个字母,和一个特殊符号。调用高级权限接口需要传入签名公钥和ASCaller参数。
        Change the password for the system Settings application.At least 7 digits in length, including at least three Numbers, three letters, and a special symbol. Calling the advanced permission interface requires passing in the signature public key and ASCaller parameters
        Parameters:
        pubKey -
        经过PAX签名的公钥。
        Public key signed by PAX.
        password -
        密码
        Password
        caller -
        高级权限接口的回调。ASCaller
        Callbacks to the advanced interfaces. see ASCaller
        Since:
        V3.11.00
      • getScreenSaver

        java.lang.String getScreenSaver()
                                 throws java.lang.Exception
        获取屏保应用的包名。
        Gets the package name of the screensaver.
        Returns:
        屏保应用的包名。
        The package name of the screensaver.
        Throws:
        java.lang.Exception
        Since:
        V3.11.00
      • enableScreenSaver

        void enableScreenSaver(boolean enable)
                        throws java.lang.Exception
        设置屏保是否可用。
        Set whether the screensaver is available.
        Parameters:
        enable -
        • true:可用。
        • false:不可用。
        • true:Available.
        • false:Unavailable.
        Throws:
        java.lang.Exception
        Since:
        V3.11.00
      • setScreenSaverActivateType

        void setScreenSaverActivateType(int type)
                                 throws java.lang.Exception
        设置屏保激活类型。
        Set the screen saver activation type.
        Parameters:
        type -
        • 0:插入基座时激活。
        • 1:充电时激活。
        • 2:插入基座时或者充电时激活。
        • 0:Activate when plugged into the base.
        • 1:Activate when charging.
        • 2:Activate when plugged into the base or when charging.
        Throws:
        java.lang.Exception
        Since:
        V3.11.00
      • enableShutdownConfirm

        void enableShutdownConfirm(boolean enable)
                            throws java.lang.Exception
        长按电源键弹出密码框,输入密码后才进去"关机/重启"界面,不输入30秒后消失。
        Long press the power button to pop up the password box, enter the "shutdown/restart" interface after entering the password, and disappear after 30 seconds.
        Parameters:
        enable -
        • true:启用。
        • false:不启用。
        • true:enable.
        • false:disable.
        Throws:
        java.lang.Exception
        Since:
        V3.12.00
      • getUsbMode

        int getUsbMode()
                throws java.lang.Exception
        获取当前USB模式。如果开启权限检查,需在AndroidManifest下添加以下权限:"com.pax.permission.USB_SECURITY"
        Get the current USB mode. If permission checking is enabled, add the following permissions under AndroidManifest : "com.pax.permission.USB_SECURITY"
        Returns:
        协议模式。
        • 0:禁用ADB和MTP
        • 1:默认模式
        • 2:文件传输模式
        • 3:CCID(虚拟读卡器)模式
        • 4:POSVCOM(百富虚拟串口)模式
        • 5 表示USB tethering (RNDIS)
        • 6 表示USB-PC internet share (RNDIS reverse)
        • 7 表示USB ECM网络共享
        • 8 表示USB ECM-HOST网络共享
        • 9 表示开启SDT,MTP
        • 10 表示USB RNDIS no tethering(无网络共享)
        • 11 表示RNDIS reverse with serial
        • 注:A920 5\A920 7\A930仅支持模式1/2/3, 需要手动重启后生效
        Protocol mode.
        • 0: Disable ADB and MTP
        • 1: Default mode
        • 2: File transfer mode
        • 3: CCID(Virtual card reader)mode
        • 4: POSVCOM(POS Virtual COM Of Pax)mode
        • 5: Indicates USB tethering (RNDIS)
        • 6: USB-PC internet share (RNDIS reverse)
        • 7: Indicates USB ECM network sharing
        • 8: Indicates the USB ECM-HOST network share
        • 9: SDT and MTP are enabled
        • 10 USB RNDIS no tethering (no network sharing)
        • 11 Indicates that RNDIS reverse with serial
        • Note: A920 5\A920 7\A930 supports only modes 1/2/3 and takes effect after manual restart
        Throws:
        java.lang.Exception
        Since:
        V3.13.00
      • enableVolumeKey

        void enableVolumeKey(boolean enable)
                      throws java.lang.Exception
        设置是否启用音量键。机器重启后恢复默认。默认值:启用。
        Sets whether the volume key is enabled. Restore the default when the machine is restarted. Default: enabled.
        Parameters:
        enable -
        • true:启用。
        • false:不启用。
        • true:enable.
        • false:disable.
        Throws:
        java.lang.Exception
        Since:
        V3.13.00
      • isVolumeKeyEnable

        boolean isVolumeKeyEnable()
                           throws java.lang.Exception
        判断音量键是否启用。
        Check whether the volume key is enabled.
        Returns:
        • true:启用。
        • false:不启用。
        • true:enable.
        • false:disable.
        Throws:
        java.lang.Exception
        Since:
        V3.13.00
      • enableSystemOTA

        void enableSystemOTA(boolean enable)
                      throws java.lang.Exception
        设置是否启用系统OTA通道。
        Sets whether the system OTA channel is enabled.
        Parameters:
        enable -
        • true:启用。
        • false:不启用。
        • true:enable.
        • false:disable.
        Throws:
        java.lang.Exception
        Since:
        V3.14.00
      • isSystemOTAEnable

        boolean isSystemOTAEnable()
                           throws java.lang.Exception
        判断系统OTA通道是否启用。
        Determine whether the system OTA channel is enabled.
        Returns:
        • true:启用。
        • false:不启用。
        • true:enable.
        • false:disable.
        Throws:
        java.lang.Exception
        Since:
        V3.14.00
      • setScanResultMode

        void setScanResultMode(int mode)
                        throws java.lang.Exception
        设置快捷键扫码结果处理模式。
        Set the shortcut key to scan the result processing mode.
        Parameters:
        mode -
        • 0:输入到输入框(IScanCodec不支持)。
        • 1:发送广播,系统按以下方式发送广播:

          private static final String SEND_BROADCAST_ACTION = "com.barcode.sendBroadcast";

          Intent resultIntent = new Intent(SEND_BROADCAST_ACTION);

          resultIntent.putExtra("BARCODE", content);

          resultIntent.putExtra("CODE_FORMAT", format);

          sendBroadcast(resultIntent);

        • 2:复制到粘贴板。
        • 0:Type into the input box. (IScanCodec not supported.)
        • 1:To send the broadcast, the system sends the broadcast in the following way:

          private static final String SEND_BROADCAST_ACTION = "com.barcode.sendBroadcast";

          Intent resultIntent = new Intent(SEND_BROADCAST_ACTION);

          resultIntent.putExtra("BARCODE", content);

          resultIntent.putExtra("CODE_FORMAT", format);

          sendBroadcast(resultIntent);

        • 2:Copy to the clipboard.
        Throws:
        java.lang.Exception
        Since:
        V3.16.00
      • setSettingsNeedPassword

        void setSettingsNeedPassword(byte[] pubKey,
                                     boolean need,
                                     ASCaller caller)
                              throws java.lang.Exception
        设置进入设置界面时是否需要密码。
        Set whether a password is required when entering the setting.
        Parameters:
        pubKey -
        经过PAX签名的公钥。
        Public key signed by PAX.
        need -
        true:需要;false:不需要。
        true:need; false: not need.
        caller -
        高级权限接口的回调。ASCaller
        Callbacks to the advanced interfaces. see ASCaller
        Throws:
        java.lang.Exception
        Since:
        V3.16.00
      • removeRecentTasks

        void removeRecentTasks(java.util.List<java.lang.String> excludePackageNames)
                        throws java.lang.Exception
        清除最近使用的程序列表。
        Clears the list of recently used programs.
        Parameters:
        excludePackageNames -
        不清除的程序包名列表。如果为NULL或者size为0,则清除所有程序。
        List of package names not cleared.If NULL or size 0, clear all programs.
        Throws:
        java.lang.Exception
        Since:
        V3.17.00
      • getAppsWhitelist

        java.util.List<java.lang.String> getAppsWhitelist(byte[] pubKey,
                                                          ASCaller caller)
                                                   throws java.lang.Exception
        获取应用白名单,白名单中的应用不能卸载。
        Get application whitelist. Whitelist application cannot be uninstalled.
        Parameters:
        pubKey -
        经过PAX签名的公钥。
        Public key signed by PAX.
        caller -
        高级权限接口的回调。ASCaller
        Callbacks to the advanced interfaces. see ASCaller
        Returns:
        应用白名单。
        The application whitelist.
        Throws:
        java.lang.Exception
        Since:
        V3.19.00
      • setAppsWhitelist

        void setAppsWhitelist(byte[] pubKey,
                              byte[] whitlist,
                              ASCaller caller)
                       throws java.lang.Exception
        设置应用白名单,会覆盖之前的应用白名单。白名单中的应用不能卸载。
        Setting the application whitelist, overrides previous application whitelist. Whitelist applications cannot be uninstalled.
        Parameters:
        pubKey -
        经过PAX签名的公钥。
        Public key signed by PAX.
        whitlist -
        应用白名单。格式如下: <whitelist><whitelistitems name="WhiteListName"><item>pkg_name1</item><item>pkg_name2</item> ... </whitelistitems></whitelist> 列表按照上边格式生成后,需要百富应用签名。
        The application whitelist. Format as follows: <whitelist><whitelistitems name="WhiteListName"><item>pkg_name1</item><item>pkg_name2</item> ... </whitelistitems></whitelist> After the list is generated in the above format, it needs to be signed by the PAX application signature.
        caller -
        高级权限接口的回调。ASCaller
        Callbacks to the advanced interfaces. see ASCaller
        Throws:
        java.lang.Exception
        Since:
        V3.19.00
      • verifySign

        boolean verifySign(int pukType,
                           java.lang.String fileAbsPath)
                    throws java.lang.Exception
        文件验签。
        Verify the file signature.
        Parameters:
        pukType -
        • 1:传统应用签名。
        • 1:Traditional application signatures.
        fileAbsPath -
        文件绝对路径。
        The absolute path to the file.
        Returns:
        • true:验签通过。
        • false:验签失败。
        • true:Validation passed.
        • false:Validation failed.
        Throws:
        java.lang.Exception
        Since:
        V3.19.00
      • enableWiFiDHCP

        boolean enableWiFiDHCP()
                        throws java.lang.Exception
        启用Wi-Fi使用DHCP连接。
        Enable Wi-Fi using DHCP connection.
        Returns:
        true:成功; false:失败。
        True: success; False: failure.
        Throws:
        java.lang.Exception
        Since:
        V3.19.00
      • setLauncher

        void setLauncher(java.lang.String packageName,
                         java.lang.String activityName,
                         boolean unconditional)
                  throws java.lang.Exception
        设置Launcher。
        Set the launcher.
        Parameters:
        packageName -
        应用包名。
        Application package name.
        activityName -
        {Activity包名}.{Activity名称}。
        {Activity package name}.{Activity name}.
        unconditional -
        • true:启动Launcher。
        • false:弹出Launcher选择框。
        • true:Start the Launcher.
        • false:Pop up the Launcher selection box.
        Throws:
        java.lang.Exception
        Since:
        V3.19.00
      • setShortcutAction

        void setShortcutAction(java.lang.String action)
                        throws java.lang.Exception
        自定义快捷键跳转到 action 指定的界面。
        Customize the shortcut key to jump to the specified action interface.
        Parameters:
        action -
        要启动的Activity的Action。
        • 举例:
        • android.settings.INTERNAL_STORAGE_SETTINGS 打开存储菜单
        • android.settings.LOCATION_SOURCE_SETTINGS 打开位置信息菜单
        The Action of the Activity to start.
        • example:
        • android.settings.INTERNAL_STORAGE_SETTINGS Open store menu
        • android.settings.LOCATION_SOURCE_SETTINGS The location information menu
        Throws:
        java.lang.Exception
        Since:
        V3.19.00
      • getCustomerResVer

        java.lang.String getCustomerResVer()
                                    throws java.lang.Exception
        获取客户资源包版本。
        Get the customer resource version.
        Returns:
        资源包版本。
        Resource version
        Throws:
        java.lang.Exception
        Since:
        V3.19.00
      • enableLocation

        void enableLocation(boolean enable)
                     throws java.lang.Exception
        开启或关闭定位服务。
        Turn location services on or off.
        Parameters:
        enable -
        • True:开启。
        • False:关闭。
        • True:Turn on.
        • False:Turn off.
        Throws:
        java.lang.Exception
        Since:
        V3.19.00
      • resetNetworkSettings

        void resetNetworkSettings()
                           throws java.lang.Exception
        重置网络设置。包括:Wi-Fi,移动数据,蓝牙。
        Reset network settings. Including: Wi-Fi, mobile data, Bluetooth.
        Throws:
        java.lang.Exception
        Since:
        V3.20.00
      • enableApplication

        void enableApplication(java.lang.String packageName,
                               boolean enable)
                        throws java.lang.Exception
        设置应用是否可用。
        Set whether the app is available. Only Unicom customers are supported.
        Parameters:
        packageName -
        应用包名。
        Application package name.
        enable -
        true: PackageManager.COMPONENT_ENABLED_STATE_ENABLED ; false:PackageManager.COMPONENT_ENABLED_STATE_DISABLED。
        true: PackageManager.COMPONENT_ENABLED_STATE_ENABLED ; false:PackageManager.COMPONENT_ENABLED_STATE_DISABLED。
        Throws:
        java.lang.Exception
        Since:
        V3.20.00
      • enableAuthDownload

        void enableAuthDownload(boolean enable)
                         throws java.lang.Exception
        使能百富授权。
        Enable PAX authorization.
        Parameters:
        enable -
        true:可用; false:不可用。
        True: enable; false: disable.
        Throws:
        java.lang.Exception
        Since:
        V3.22.00
      • getInterceptorVersion

        java.lang.String getInterceptorVersion()
                                        throws java.lang.Exception
        获取读卡器拦截器的版本。
        Gets the version of the reader interceptor.
        Returns:
        读卡器拦截器的版本。
        The version of the reader interceptor.
        Throws:
        java.lang.Exception
        Since:
        V3.22.00
      • setBootAnimation

        void setBootAnimation(java.lang.String filePath)
                       throws java.lang.Exception
        设置开机动画。注意:必须有固件签名。
        Set boot animation. Note: Must have firmware signature.
        Parameters:
        filePath -
        开机动画资源文件的路径。
        The path of the boot animation resource file.
        Throws:
        java.lang.Exception
        Since:
        V3.23.00
      • setBootLogo

        void setBootLogo(java.lang.String filePath)
                  throws java.lang.Exception
        设置开机Logo。注意:必须有固件签名。
        Set the boot logo. Note: Must have firmware signature.
        Parameters:
        filePath -
        开机Logo资源文件的路径。
        The path of the boot logo resource file.
        Throws:
        java.lang.Exception
        Since:
        V3.23.00
      • enableShortPressPowerKey

        void enableShortPressPowerKey(boolean enable)
                               throws java.lang.Exception
        禁用或者启用短按电源键熄屏。设备重启恢复默认。
        Disable or enable short press the power button to turn off the screen. The device restarts to restore the default.
        Parameters:
        enable -
        • true:短按电源键熄屏。默认。
        • false:短按电源键不熄屏。
        • true: Short press the power button to turn off the screen. default.
        • false:Short press the power button does not turn off the screen.
        Throws:
        java.lang.Exception
        Since:
        V3.23.00
      • enableEthernetTether

        void enableEthernetTether(boolean enable)
                           throws java.lang.Exception
        设置以太网共享网络功能是否可用。需重启设备才能生效。
        Set whether the Ethernet shared network function is available. Need to restart the device to take effect.
        Parameters:
        enable -
        true:可用; false:不可用。
        True: enable; false: disable.
        Throws:
        java.lang.Exception
        Since:
        V3.24.00
      • set24Hour

        boolean set24Hour(boolean is24Hour)
        设置时间24小时制。
        Set time 24-hour clock.
        Parameters:
        is24Hour -
        true: 24小时; false: 12小时。
        true: 24 hours; false: 12 hours.
        Returns:
        true: 设置成功; false: 设置失败。
        true: success; false: failure.
        Since:
        V3.24.00
      • enableBaseUsb

        void enableBaseUsb(boolean enable)
                    throws java.lang.Exception
        禁用或者启用底座USB切换。
        Disable or enable base USB switching.
        Parameters:
        enable -
        • true:切换。默认。
        • false:不切换。
        • true: Switch. default.
        • false: Don't switch.
        Throws:
        java.lang.Exception
        Since:
        V3.24.00
      • writeCustomerResConfig

        void writeCustomerResConfig(java.lang.String filePath)
                             throws java.lang.Exception
        写入应用签名或固件签名的文件。注意:写入的文件需要符合CustomerResConfig给出的规范, 且有应用签名或固件签名,写入文件成功后, 配合资源包使用, 重启机器, 即可让xml文件中的需求生效。
        Write application signature or firmware signature file. Note: The written file needs to conform to the specifications given by CustomerResConfig and has an application signature or firmware signature. After the file is successfully written, use it with the resource package and restart the machine to make the requirements in the xml file take effect.
        Parameters:
        filePath -
        文件路径。
        File path.
        Throws:
        java.lang.Exception
        Since:
        V3.24.00
      • turnOnWiFiHotspot

        boolean turnOnWiFiHotspot(java.lang.String ssid,
                                  java.lang.String preShareKey,
                                  int keyManagement)
        开启Wi-Fi热点。
        Turn on the Wi-Fi hotspot.
        Parameters:
        ssid -
        热点名称。传null则代表只打开热点,不更新参数。
        Hotspot name. Passing null means that only the hotspot is turned on and the parameters are not updated.
        preShareKey -
        热点密码。
        Hotspot password.
        keyManagement -
        热点安全性类型。
        • 0: NONE
        • 1: WPA_PSK
        • 2: WPA_EAP
        • 3: IEEE8021X
        • 4: WPA2_PSK
        Hotspot security type.
        • 0: NONE
        • 1: WPA_PSK
        • 2: WPA_EAP
        • 3: IEEE8021X
        • 4: WPA2_PSK
        Returns:
        True: 成功。False:失败。
        True: success. False: failed.
        Since:
        V3.25.00
      • turnOffWiFiHotspot

        boolean turnOffWiFiHotspot()
        关闭Wi-Fi热点。
        Turn off the Wi-Fi hotspot.
        Returns:
        True: 成功。False:失败。
        True: success. False: failed.
        Since:
        V3.25.00
      • getWiFiHotspotStatus

        int getWiFiHotspotStatus()
        获取Wi-Fi热点状态。
        Get Wi-Fi hotspot status.
        Returns:
        1:开启。0:关闭。
        1: Turn on. 0: Turn off.
        Since:
        V3.25.00
      • setChargeLimit

        void setChargeLimit(boolean limit)
                     throws java.lang.Exception
        控制充电控制机制。开启该机制后,充电范围控制在15%-35%,电量低于15%复充,超过35%停止。
        Control the charging limit. After it is turned on, the charging range is controlled at 15%-35%, charging starts when the power is below 15%, and charging stops when the power exceeds 35%.
        Parameters:
        limit -
        true:打开该机制。false:关闭该机制。
        true: Turn on. false: Turn off.
        Throws:
        java.lang.Exception
        Since:
        V3.26.00
      • setNTPServerParam

        boolean setNTPServerParam(NtpServerParam param)
                           throws java.lang.Exception
        设置NTP服务器和超时时间。需在AndroidManifest中添加权限:"com.pax.permission.NTP"。
        Set NTP server and timeout. Need to add permission in AndroidManifest: "com.pax.permission.NTP".
        Parameters:
        param - NtpServerParam
        Returns:
        成功:true
        失败:false
        Success: true
        Failure: false
        Throws:
        java.lang.Exception
        Since:
        V3.26.00
      • getNTPServerParam

        NtpServerParam getNTPServerParam()
                                  throws java.lang.Exception
        获取NTP服务器和超时时间。需在AndroidManifest中添加权限:"com.pax.permission.NTP"。
        Get NTP server and timeout. Need to add permission in AndroidManifest: "com.pax.permission.NTP".
        Returns:
        NtpServerParam
        Throws:
        java.lang.Exception
        Since:
        V3.26.00
      • enableBatterySaverPrompt

        void enableBatterySaverPrompt(boolean enabled)
                               throws java.lang.Exception
        设置低电量提醒框。
        Set low battery reminder box.
        Parameters:
        enabled -
        是否开启
        true: 表示开启
        false: 表示关闭
        Whether to open
        true: open
        false: close
        Throws:
        java.lang.Exception
        Since:
        V3.28.00
      • goToSleep

        void goToSleep()
                throws java.lang.Exception
        强制设备进入休眠状态。
        Force the device to sleep.
        Throws:
        java.lang.Exception
        Since:
        V3.29.00
      • setLocationMode

        boolean setLocationMode(int mode)
                         throws java.lang.Exception
        设置GPS定位模式。
        Set GPS positioning mode.
        Parameters:
        mode -
        定位模式
        • 1.仅限设备
        • 2.低耗电量
        • 3.高精确度
        positioning mode
        • 1. Device only
        • 2. Low power consumption
        • 3. High precision
        Returns:
        成功时返回true,失败时返回false
        Returns true on success, false on failure
        Throws:
        java.lang.Exception
        Since:
        V3.29.00
      • getSecurityInfo

        android.os.Bundle getSecurityInfo()
                                   throws java.lang.Exception
        获取安全相关的版本信息。
        Get security-related version information.
        Returns:
        KEY名称 类型 说明
        pciver String PCI Version
        secver String Security Version
        firmver String Firmware Version
        KEY type Description
        pciver String PCI Version
        secver String Security Version
        firmver String Firmware Version
        Throws:
        java.lang.Exception
        Since:
        V3.29.00
      • turnOnWiFiHotspot

        boolean turnOnWiFiHotspot(java.lang.String ssid,
                                  java.lang.String preShareKey,
                                  int keyManagement,
                                  int channel)
                           throws java.lang.Exception
        开启Wi-Fi热点。
        Turn on the Wi-Fi hotspot.
        Parameters:
        ssid -
        热点名称。传null则代表只打开热点,不更新参数。
        Hotspot name. Passing null means that only the hotspot is turned on and the parameters are not updated.
        preShareKey -
        热点密码。
        Hotspot password.
        keyManagement -
        热点安全性类型。
        • 0: NONE
        • 1: WPA_PSK
        • 2: WPA_EAP
        • 3: IEEE8021X
        • 4: WPA2_PSK
        Hotspot security type.
        • 0: NONE
        • 1: WPA_PSK
        • 2: WPA_EAP
        • 3: IEEE8021X
        • 4: WPA2_PSK
        channel -
        信道
        • 自动选择信道:0
        • 2.4G信道:1-11
        • 5G信道:36,40,44,48,149,153,157,161,165
        Channel
        • Auto select channel: 0
        • 2.4G channel: 1-11
        • 5G channels: 36, 40, 44, 48, 149, 153, 157, 161, 165
        Returns:
        True: 成功。False:失败。
        True: success. False: failed.
        Throws:
        java.lang.Exception
        Since:
        V3.30.00
      • getScreenBrightness

        int getScreenBrightness()
                         throws java.lang.Exception
        获取屏幕亮度
        get screen brightness
        Returns:
        当前屏幕亮度
        Current screen brightness
        Throws:
        java.lang.Exception
        Since:
        V3.30.00
      • enableMassStorage

        void enableMassStorage(boolean enable)
                        throws java.lang.Exception
        使能大容量存储器挂载。
        Enable mass storage mounts.
        Parameters:
        enable -
        是否启用
        true: 表示启用挂载
        false: 表示禁用挂载
        Whether to enable
        true: enable mount
        false: disable mount
        Throws:
        java.lang.Exception
        Since:
        V3.29.00
      • setEcmStaticIP

        boolean setEcmStaticIP(java.lang.String ipAddress,
                               int networkPrefixLength)
                        throws java.lang.Exception
        设置ECM静态IP(设备必须已经是"USB ECM网络共享模式")。
        Set ECM static IP (device must already be in "USB ECM tethering mode").
        Parameters:
        ipAddress -
        IP地址
        IP address
        networkPrefixLength -
        网络前缀长度
        network prefix length
        Returns:
        true: 设置成功, false: 设置失败
        true: set successfully, false: set failed
        Throws:
        java.lang.Exception
        Since:
        V3.30.00
      • getEcmStaticIP

        java.lang.String getEcmStaticIP()
                                 throws java.lang.Exception
        获取ECM静态IP。
        Get ECM static IP.
        Returns:
        静态IP
        static IP
        Throws:
        java.lang.Exception
        Since:
        V3.30.00
      • lockTerminal

        void lockTerminal(byte[] pubKey,
                          ASCaller caller)
                   throws java.lang.Exception
        锁定终端。
        lock the terminal.
        Parameters:
        pubKey -
        经过PAX签名的公钥。
        Public key signed by PAX.
        caller -
        高级权限接口的回调。ASCaller
        Callbacks to the advanced interfaces. see ASCaller
        Throws:
        java.lang.Exception
        Since:
        V3.30.00
      • unlockTerminal

        void unlockTerminal(byte[] pubKey,
                            ASCaller caller)
                     throws java.lang.Exception
        解锁终端。
        unlock the terminal.
        Parameters:
        pubKey -
        经过PAX签名的公钥。
        Public key signed by PAX.
        caller -
        高级权限接口的回调。ASCaller
        Callbacks to the advanced interfaces. see ASCaller
        Throws:
        java.lang.Exception
        Since:
        V3.30.00
      • getLockTerminalStatus

        boolean getLockTerminalStatus(byte[] pubKey,
                                      ASCaller caller)
                               throws java.lang.Exception
        查询终端锁定的状态。
        get the lock status of a terminal.
        Parameters:
        pubKey -
        经过PAX签名的公钥。
        Public key signed by PAX.
        caller -
        高级权限接口的回调。ASCaller
        Callbacks to the advanced interfaces. see ASCaller
        Returns:
        终端状态(true:Lock false:unLock) 。
        terminal status(true:Lock false:unLock) .
        Throws:
        java.lang.Exception
        Since:
        V3.30.00
      • installWifiCertificate

        boolean installWifiCertificate(byte[] cert,
                                       java.lang.String certName,
                                       boolean isP12,
                                       java.lang.String certPwd)
                                throws java.lang.Exception
        安装wifi证书,需申请权限"com.pax.permission.WIFICERT_INSTALL"。
        To install the wifi certificate, add the following permissions under AndroidManifest :"com.pax.permission.WIFICERT_INSTALL".
        Parameters:
        cert -
        证书数据,需要签名
        Certificate data, needs to be signed
        certName -
        证书名称
        Certificate name
        isP12 -
        是否是pkcs12格式
        Is it in pkcs12 format
        certPwd -
        如果是pkcs12格式,需指定密码
        If it is in pkcs12 format, you need to specify the password
        Returns:
        true:成功 false:失败
        true: success false: failure
        Throws:
        java.lang.Exception
        Since:
        V3.30.00
      • setRebootTime

        void setRebootTime(java.lang.String time)
                    throws java.lang.Exception
        设置24小时重启的时间点
        当调用接口设置一个新的重启时间点后,会立刻生效,按更新的设置时间点重启。
        Set a 24-hour reboot time
        When calling the interface to set a new restart time point, it will take effect immediately, and restart according to the updated set time point.
        Parameters:
        time -
        重启的时间点,24小时制,格式为hh:mm:ss,个位数需在前补0,例如08:30:00
        The reboot time, 24-hour format, the format is hh:mm:ss, the single digit needs to be filled with 0, such as 08:30:00
        Throws:
        java.lang.Exception
        Since:
        V3.31.00
      • isAutomaticRotation

        boolean isAutomaticRotation()
                             throws java.lang.Exception
        获取屏幕自动旋转状态
        Gets the automatic screen rotation status.
        Returns:
        true:自动旋转屏幕开启 false:自动旋转屏幕关闭
        true: automatic screen rotation is enabled false: automatic screen rotation is disabled
        Throws:
        java.lang.Exception
        Since:
        V3.32.00
      • setAutomaticRotation

        boolean setAutomaticRotation(boolean isAutomaticRotation)
                              throws java.lang.Exception
        设置屏幕自动旋转
        Set automatic screen rotation
        Parameters:
        isAutomaticRotation -
        true:开启屏幕自动旋转 - false:关闭屏幕自动旋转
        true: enables automatic screen rotation. - false: disables automatic screen rotation
        Returns:
        true:成功 false:失败
        true: succeeds. false: fails
        Throws:
        java.lang.Exception
        Since:
        V3.32.00
      • setRebootTimeEnable

        void setRebootTimeEnable(boolean enable)
                          throws java.lang.Exception
        设置固定时间点重启
        Enable or disable reboot at a fixed time
        Parameters:
        enable -
        true:开启固定时间点重启 false:关闭固定时间点重启
        true: enables the reboot at a fixed time. false: disables the reboot at a fixed time
        Throws:
        java.lang.Exception
        Since:
        V3.32.00
      • enableScreenshot

        void enableScreenshot(boolean enable)
                       throws java.lang.Exception
        关闭开启系统截图功能。
        Disable or enable the system screenshot function.
        Parameters:
        enable -
        true:开启系统截图 false:关闭系统截图
        true: enable system screenshot. false: disable system screenshot
        Throws:
        java.lang.Exception
        Since:
        V3.32.00
      • updateSystemTimeZoneData

        void updateSystemTimeZoneData(java.lang.String filePath)
                               throws java.lang.Exception
        更新设备的时区数据
        注意:调用后需重启设备才能生效。
        Update the time zone data of the device
        Note: The call takes effect only after the device is restarted.
        Parameters:
        filePath -
        时区数据库的路径
        Path to the time zone database
        Throws:
        java.lang.Exception
        Since:
        V3.32.00
      • showCustomizedPowerOffUI

        void showCustomizedPowerOffUI(boolean enable)
                               throws java.lang.Exception
        使用客制化关机界面
        Use the customized power off UI
        Parameters:
        enable -
        true:开启 false:关闭
        true: enable false: disable
        Throws:
        java.lang.Exception
        Since:
        V3.32.00
      • getRebootTime

        java.lang.String getRebootTime()
                                throws java.lang.Exception
        获取24小时重启的时间点
        Get a 24-hour reboot time
        Returns:
        重启时间点
        reboot time
        Throws:
        java.lang.Exception
        Since:
        V3.32.00
      • setInfoCollect

        void setInfoCollect(boolean enable)
                     throws java.lang.Exception
        设置终端信息收集
        Set terminal information collection
        Parameters:
        enable -
        true:表示开启 false:表示关闭
        true: enable false: disable
        Throws:
        java.lang.Exception
        Since:
        V3.32.00
      • isShortPressPowerKeyDisabled

        boolean isShortPressPowerKeyDisabled()
                                      throws java.lang.Exception
        获取短按电源键是否被禁用
        Gets whether short press of the power button is disabled
        Returns:
        true表示禁用短按电源键不熄屏,false表示开启短按电源键可以熄屏。
        true: disables the power button to turn off the screen. false: enables the power button to turn off the screen.
        Throws:
        java.lang.Exception
        Since:
        V3.32.00
      • setLoadRecentTasks

        void setLoadRecentTasks(boolean enable)
                         throws java.lang.Exception
        设置是否加载最近任务列表
        若设置为加载,则设备重启后可显示关机前的任务记录。若设置为不加载,则显示为空
        Set whether to load the recent task list
        If set to load, the task records before shutdown are displayed after the device is restarted. If it is set to not load, it is empty.
        Parameters:
        enable -
        true 表示加载(默认), false 表示不加载
        true means load (default), false means not load
        Throws:
        java.lang.Exception
        Since:
        V3.33.00
      • setFontScale

        void setFontScale(int font)
                   throws java.lang.Exception
        设置字体大小
        Set font size
        Parameters:
        font -
        0:小 1:默认(正常) 2:大 3:最大
        0: small 1: default (normal) 2: large 3: largest
        Throws:
        java.lang.Exception
        Since:
        V3.33.00
      • isAutomaticBrightness

        boolean isAutomaticBrightness()
                               throws java.lang.Exception
        获取是否自动调节亮度模式
        Get whether to automatically adjust brightness mode
        Returns:
        true:自动亮度模式,false:手动模式
        true: automatic brightness mode, false: manual mode
        Throws:
        java.lang.Exception
        Since:
        V3.33.00
      • setBrightnessMode

        void setBrightnessMode(boolean isAutomatic)
                        throws java.lang.Exception
        设置自动调节亮度模式
        Set the automatic brightness mode
        Parameters:
        isAutomatic -
        true:自动亮度模式,false:手动模式
        true: automatic brightness mode, false: manual mode
        Throws:
        java.lang.Exception
        Since:
        V3.33.00
      • getDefaultLauncherPackageName

        java.lang.String getDefaultLauncherPackageName()
                                                throws java.lang.Exception
        获取系统默认桌面包名
        Get the system default launcher package name
        Throws:
        java.lang.Exception
        Since:
        V4.00.00
      • getDefaultLauncherActivityName

        java.lang.String getDefaultLauncherActivityName()
                                                 throws java.lang.Exception
        获取系统默认桌面的Activity的名字。
        Get the system default launcher activity name
        Throws:
        java.lang.Exception
        Since:
        V4.00.00
      • setDefaultLauncher

        void setDefaultLauncher(boolean unconditional)
                         throws java.lang.Exception
        设置允许系统启动“默认桌面”,而不弹出选择对话框,即使有几个桌面。
        Set startup "Default Launcher".
        Parameters:
        unconditional -
        true表示进入默认桌面而没有弹出选择对话框
        Throws:
        java.lang.Exception
        Since:
        V4.00.00
      • beep

        void beep()
        蜂鸣器立即发出一声“嘀”,持续时间为 100ms。
        The buzzer immediately emits a "beep" for 100ms.
        Since:
        V4.01.00
      • disableEmergency

        void disableEmergency(boolean disable)
                       throws java.lang.Exception
        屏蔽关机菜单中的紧急拨号功能。
        Block the emergency dial function in the shutdown menu.
        Parameters:
        disable -
        true 表示屏蔽, false 表示不屏蔽
        true means blocking, false means not blocking
        Throws:
        java.lang.Exception
        Since:
        V4.02.00
      • disableScreenshot

        void disableScreenshot(boolean disable)
                        throws java.lang.Exception
        屏蔽关机菜单中的系统截图功能。
        Block the system screenshot function in the shutdown menu.
        Parameters:
        disable -
        true 表示屏蔽, false 表示不屏蔽
        true means blocking, false means not blocking
        Throws:
        java.lang.Exception
        Since:
        V4.02.00
      • setAppSwitchListener

        void setAppSwitchListener(boolean isOpen,
                                  IAppSwitchListener listener)
                           throws java.lang.Exception
        设置监听应用。
        Set application switch listener.
        Parameters:
        isOpen -
        true:打开服务 false:关闭服务
        true: open the service false: close the service
        listener -
        IAppSwitchListener 注: true时,listener不能为null.
        IAppSwitchListener Note: When true, listener cannot be null.
        Throws:
        java.lang.Exception
        Since:
        V4.03.00
      • setDisplaySize

        void setDisplaySize(int mode)
                     throws java.lang.Exception
        设置显示大小。
        Set display size.
        Parameters:
        mode -
        0:小 1:默认(正常) 2:大 其它值:非法
        0: Small 1: Default (normal) 2: Large Other values: illegal
        Throws:
        java.lang.Exception
        Since:
        V4.03.00
      • setRebootMode

        void setRebootMode(byte mode)
                    throws java.lang.Exception
        设置Reboot重启模式。
        Set reboot mode.
        Parameters:
        mode -
        1: 48小时重启
        1: reboot in 48 hours
        Throws:
        java.lang.Exception
        Since:
        V4.05.00
      • getRebootTimeEnabled

        boolean getRebootTimeEnabled()
                              throws java.lang.Exception
        获取定时重启开关的状态
        Get the status of the scheduled reboot switch
        Returns:
        true:开启定时重启 false:关闭定时重启
        true: enable scheduled reboot false: disable scheduled reboot
        Throws:
        java.lang.Exception
        Since:
        V4.05.00
      • setUsbVirtualEthConfig

        void setUsbVirtualEthConfig(java.lang.String iface,
                                    LanParam param)
                             throws java.lang.Exception
        设置usb虚拟以太网配置。
        Set USB virtual Ethernet configuration.
        Parameters:
        iface -
        ecm0或rndis0或rndis_host0
        ecm0 or rndis0 or rndis_host0.
        param -
        Throws:
        java.lang.Exception
        Since:
        V4.05.00
      • getUsbVirtualEthConfig

        LanParam getUsbVirtualEthConfig(java.lang.String iface)
                                 throws java.lang.Exception
        获取以太网IP地址信息。
        Get USB virtual Ethernet configuration.
        Parameters:
        iface -
        ecm0或rndis0或rndis_host0
        ecm0 or rndis0 or rndis_host0.
        Returns:
        Throws:
        java.lang.Exception
        Since:
        V4.05.00
      • setChargerScreenDisabled

        boolean setChargerScreenDisabled(boolean disable)
                                  throws java.lang.Exception
        是否允许关机时接入适配器自动开机。
        Whether to allow the access adapter to turn on automatically when shutdown.
        Parameters:
        disable -
        true:允许 false:禁止
        true: allow false: forbid
        Returns:
        true:成功; false:失败。
        True: success; False: failure.
        Throws:
        java.lang.Exception
        Since:
        V4.07.00
      • setApplicationNeedPassword

        void setApplicationNeedPassword(java.lang.String pkgName,
                                        java.lang.String password)
                                 throws java.lang.Exception
        设置启动应用密码。
        Set the password for starting the application.
        Parameters:
        pkgName -
        应用包名。
        Application package name.
        password -
        密码。
        Password.
        Throws:
        java.lang.Exception
        Since:
        V4.07.00
      • setBatteryManagerEnable

        void setBatteryManagerEnable(boolean enable)
                              throws java.lang.Exception
        打开或关闭电池管理器
        Turn on or off the battery manager
        Parameters:
        enable -
        true:打开 false:关闭
        true: enable false: disable
        Throws:
        java.lang.Exception
        Since:
        V4.07.00
      • setTetheringIp

        void setTetheringIp(int iface,
                            java.lang.String ip)
                     throws java.lang.Exception
        设置USB tethering的子网。
        Set the subnet for USB tethering.
        Parameters:
        iface -
        0--RNDIS_INTERFACE;1--ECM_INTERFACE
        0--RNDIS_INTERFACE;1--ECM_INTERFACE
        ip -
        ip信息
        IP information
        Throws:
        java.lang.Exception
        Since:
        V4.07.00
      • getTetheringIp

        java.lang.String getTetheringIp(int iface)
                                 throws java.lang.Exception
        获取USB tethering 子网的IP信息。
        Get IP information of USB tethering subnet.
        Parameters:
        iface -
        0--RNDIS_INTERFACE;1--ECM_INTERFACE
        0--RNDIS_INTERFACE;1--ECM_INTERFACE
        Returns:
        ip信息
        IP information
        Throws:
        java.lang.Exception
        Since:
        V4.07.00
      • enableBatteryLevelShow

        void enableBatteryLevelShow(boolean enable)
                             throws java.lang.Exception
        设置是否显示电量百分比。
        Set whether to display battery percentage.
        Parameters:
        enable -
        true:显示 false:不显示
        true: display false: do not display.
        Throws:
        java.lang.Exception
        Since:
        V4.07.00
      • setSecScreenBrightness

        void setSecScreenBrightness(int brightness)
                             throws java.lang.Exception
        设置副屏屏幕亮度。
        Set the screen brightness of the secondary screen.
        Parameters:
        brightness -
        设置的副屏亮度(范围0-100)
        Secondary screen brightness (range 0-100).
        Throws:
        java.lang.Exception
        Since:
        V4.07.00
      • getSecScreenBrightness

        int getSecScreenBrightness()
                            throws java.lang.Exception
        获取副屏屏幕亮度。
        Get the screen brightness of the secondary screen.
        Returns:
        当前副屏屏幕亮度
        Current screen brightness of secondary screen.
        Throws:
        java.lang.Exception
        Since:
        V4.07.00
      • setAppPowerSaveConfigWithType

        void setAppPowerSaveConfigWithType(java.lang.String packageName,
                                           boolean on)
                                    throws java.lang.Exception
        打开或者关闭设置—电池—更多设置—应用待机优化中的应用优化开关
        Turn on or off Settings - Battery - More Settings - Application Optimization switch in Application Standby Optimization
        Parameters:
        packageName -
        应用的包名
        The package name of the application
        on -
        true表示打开对应应用的优化开关,false表示关闭对应应用的应用优化开关
        true: Enables the optimization switch of the corresponding application; false: disables the optimization switch of the corresponding application
        Throws:
        java.lang.Exception
        Since:
        V4.08.00
      • disableGlobalAirPlane

        void disableGlobalAirPlane(boolean disable)
                            throws java.lang.Exception
        隐藏关机菜单中的飞行模式
        Hide Airplane Mode in the shutdown menu
        Parameters:
        disable -
        true 表示隐藏, false 表示不隐藏
        true: hides; false: does not hide
        Throws:
        java.lang.Exception
        Since:
        V4.08.00
      • disableGlobalSilent

        void disableGlobalSilent(boolean disable)
                          throws java.lang.Exception
        隐藏关机菜单中的响铃功能
        Hide the ringing function in the shutdown menu
        Parameters:
        disable -
        true 表示隐藏, false 表示不隐藏
        true: hides; false: does not hide
        Throws:
        java.lang.Exception
        Since:
        V4.08.00
      • setLongPowerKeyDisable

        void setLongPowerKeyDisable(boolean disable)
                             throws java.lang.Exception
        禁用或启用Power键长按关机功能
        To disable or enable the power-off function, hold down the Power key
        Parameters:
        disable -
        true:禁用Power键长按关机功能 false:开启Power键长按关机功能
        true: disables the Power key and hold down. false: disables the Power key and hold down
        Throws:
        java.lang.Exception
        Since:
        V4.08.00
      • setSmartSavingModeWhenCharging

        boolean setSmartSavingModeWhenCharging(boolean config)
                                        throws java.lang.Exception
        设置充电时是否退出省电模式。
        Set whether to exit the power saving mode during charging.
        Parameters:
        config -
        enable - true 退出;false 不退出
        enable-true Exits. false Do not exit
        Returns:
        true 设置成功; false 设置失败
        true The setting succeeds. false Setting failed
        Throws:
        java.lang.Exception
        Since:
        V4.09.00
      • showCarrierName

        void showCarrierName(boolean enable)
                      throws java.lang.Exception
        设置是否在状态栏上显示运营商名称 注:重启后生效
        Whether to display the carrier name in the status bar Note: This parameter takes effect after the restart
        Parameters:
        enable -
        true 显示;false 隐藏
        true Displays; false hide
        Throws:
        java.lang.Exception
        Since:
        V4.09.00
      • setUsbHostDisable

        void setUsbHostDisable(boolean disable)
                        throws java.lang.Exception
        设置是否禁用USB外设。
        Set whether to disable USB peripherals.
        Parameters:
        disable -
        true:禁用 立刻生效的 false:开启 重启才生效
        true: disables the function that takes effect immediately. false: The function takes effect after restart
        Throws:
        java.lang.Exception
        Since:
        V4.09.00
      • isUsbHostDisabled

        boolean isUsbHostDisabled()
                           throws java.lang.Exception
        获取是否禁用USB外设的状态。
        Gets the status of whether to disable USB peripherals.
        Returns:
        true:禁用 false:开启
        true: disabled false: enabled
        Throws:
        java.lang.Exception
        Since:
        V4.09.00
      • setWifiWakeupEnabled

        void setWifiWakeupEnabled(boolean enable)
                           throws java.lang.Exception
        设置自动开启 WLAN功能
        The WLAN function is enabled automatically
        Parameters:
        enable -
        true:开启,false:关闭
        true: enable, false: disable
        Throws:
        java.lang.Exception
        Since:
        V4.09.00
      • getShowBatteryLevel

        boolean getShowBatteryLevel()
                             throws java.lang.Exception
        获取电池电量百分比开关状态。
        Obtain the battery percentage switch status.
        Returns:
        true 表示打开,false 表示关闭
        true: Enabled, false: disabled.
        Throws:
        java.lang.Exception
        Since:
        V4.09.00
      • getScreenRotation

        int getScreenRotation()
                       throws java.lang.Exception
        获取屏幕旋转的角度
        Gets the Angle at which the screen rotates
        Returns:
        角度值
        Angular value
        Throws:
        java.lang.Exception
        Since:
        V4.09.00
      • setScreenRotation

        boolean setScreenRotation(int rotation)
                           throws java.lang.Exception
        设置屏幕旋转角度
        Set the screen rotation Angle
        Parameters:
        rotation -
        屏幕旋转角度,rotation是90的倍数,如:0、90等.
        The screen rotation Angle is a multiple of 90, such as 0, 90.
        Returns:
        true:成功,false:失败
        true: succeeds, false: fails
        Throws:
        java.lang.Exception
        Since:
        V4.09.00
      • updateBootAnimation

        void updateBootAnimation(java.lang.String fileName)
                          throws java.lang.Exception
        下载客户私钥签名的开机动画,注意:开机动画大小不超过30M
        Download the power-on animation signed by the customer's private key. Note: The size of the power-on animation should not exceed 30M
        Parameters:
        fileName -
        开机动画资源文件的路径
        The path to the power-on animation resource file.
        Throws:
        java.lang.Exception
        Since:
        V4.10.00
      • updateBootLogo

        void updateBootLogo(java.lang.String fileName)
                     throws java.lang.Exception
        下载客户私钥签名的开机LOGO,注意:开机LOGO大小不超过30M
        Download the startup LOGO signed by the customer's private key,Note: Boot LOGO size does not exceed 30M
        Parameters:
        fileName -
        开机LOGO资源文件的路径
        Startup LOGO Specifies the path to the resource file.
        Throws:
        java.lang.Exception
        Since:
        V4.10.00
      • updateSettingsPasswordHashValue

        void updateSettingsPasswordHashValue(byte[] pubKey,
                                             java.lang.String sha256,
                                             ASCaller caller)
                                      throws java.lang.Exception
        更新Setting应用的密码
        Update the password of Setting
        Parameters:
        pubKey -
        公钥
        Public key.
        sha256 -
        密码对应的Hash值,仅支持sha256
        The Hash value corresponding to the password can only be sha256.
        caller -
        回调传入私钥加密后的数据
        Callback The encrypted data passed into the private key.
        Throws:
        java.lang.Exception
        Since:
        V4.10.00
      • allowAccessContactsBtPairing

        void allowAccessContactsBtPairing(boolean flag)
                                   throws java.lang.Exception
        蓝牙配对界面是否需要显示访问通信录和通话记录提示框
        Whether to display the access address book and call history prompt box on the Bluetooth pairing interface
        Parameters:
        flag -
        false: 隐藏checkBox访问通讯录和通话记录提示,并且默认不勾选 true:保持原生设计,显示checkBox访问通讯录和通话记录提示
        false: hides the prompt for the checkBox to access contacts and call records, and is deselected by default true: Keep the original design and display the checkBox prompt for accessing contacts and call history
        Throws:
        java.lang.Exception
        Since:
        V4.10.00
      • allowBtOpenAirplane

        void allowBtOpenAirplane(boolean enable)
                          throws java.lang.Exception
        飞行模式下是否保持蓝牙打开状态
        Whether to keep Bluetooth on in airplane mode
        Parameters:
        enable -
        true:飞行模式下保持蓝牙打开状态,false:飞行模式下保持蓝牙关闭状态
        true: enable, false: disable
        Throws:
        java.lang.Exception
        Since:
        V4.10.00
      • disableAnimations

        void disableAnimations(boolean disable)
                        throws java.lang.Exception
        禁用系统动画
        Disable system animation
        Parameters:
        disable -
        true:关闭;false:打开
        true: disable. false: enable
        Throws:
        java.lang.Exception
        Since:
        V4.11.00
      • getDeviceTamperInfo

        int getDeviceTamperInfo()
                         throws java.lang.Exception
        获取设备是否触发
        Obtain whether the device is triggered
        Returns:
        0:未触发 非0:触发
        0: not triggered Non-0: triggered
        Throws:
        java.lang.Exception
        Since:
        V4.11.00
      • setDefaultDns

        void setDefaultDns(java.lang.String dns1,
                           java.lang.String dns2)
                    throws java.lang.Exception
        用于设置默认DNS,调用接口后需要断开网络,再重新连接网络才能生效,例如:调用接口后需要先关闭移动数据开关, 然后再打开移动数据流量开关。WIFI也是如此,需要断开当前WiFi连接然后重连才能生效。
        This parameter is used to set the default DNS. After invoking an interface, disconnect from the network and reconnect to the network. For example, after invoking an interface, disable the mobile data switch. Then turn on the mobile data traffic switch. The same is true for WIFI, which requires disconnecting the current WiFi connection and then reconnecting to work.
        Parameters:
        dns1 -
        DNS的IP地址
        IP address of DNS
        dns2 -
        DNS的IP地址
        IP address of DNS
        Throws:
        java.lang.Exception
        Since:
        V4.11.00
      • reset

        void reset()
            throws java.lang.Exception
        恢复出厂设置 需在AndroidManifest下添加以下权限:"com.pax.permission.RESET"
        To restore factory Settings, you need to add the following permissions in the AndroidManifest :"com.pax.permission.RESET"
        Throws:
        java.lang.Exception
        Since:
        V4.12.00
      • setPowerSaveMode

        void setPowerSaveMode(int mode)
                       throws java.lang.Exception
        设置省电模式 注:仅适用于展讯平台的产品
        Set power saving mode Note: Only applicable to Spreadtrum platform products
        Parameters:
        mode -
        1-智能省电模式;3-省电模式;4-超级省电模式
        1 - Intelligent power saving mode; 3- Power saving mode; 4- Super Power saving mode
        Throws:
        java.lang.Exception
        Since:
        V4.14.00
      • setTpWakeupEnable

        void setTpWakeupEnable(boolean enable)
                        throws java.lang.Exception
        设置TP唤醒是否打开。注:功能需要重启生效。
        Set whether TP wake-up is enabled. Note: The function needs to be restarted to take effect.
        Parameters:
        enable -
        true - 打开,false 关闭
        true - On, false off
        Throws:
        java.lang.Exception
        Since:
        V4.14.00
      • getTpWakeupEnable

        boolean getTpWakeupEnable()
                           throws java.lang.Exception
        获取TP唤醒功能开关状态。
        Get the status of TP Wake up switch.
        Returns:
        true-打开,false-关闭
        true- On, false- off
        Throws:
        java.lang.Exception
        Since:
        V4.14.00
      • setEthernetSpeedLimit

        boolean setEthernetSpeedLimit(int speed)
                               throws java.lang.Exception
        设置ethernet的限制速度
        set the limit speed of ethernet
        Parameters:
        speed -
        10,100,1000,0(不限速),单位为Mbps
        10,100,1000,0(not limited), expressed in Mbit/s
        Returns:
        true:设置成功,false:设置失败
        true: succeeds, false: fails
        Throws:
        java.lang.Exception
        Since:
        V4.14.00
      • getEthernetSpeedLimit

        int getEthernetSpeedLimit()
                           throws java.lang.Exception
        获取ethernet当前的限制速度
        get the current limiting speed of ethernet
        Returns:
        10,100,1000,0(不限速)和-1(读取失败),单位为Mbps
        10,100,1000,0 (not limited), and -1 (read failure), expressed in Mbit/s
        Throws:
        java.lang.Exception
        Since:
        V4.14.00
      • setAutoAdaptionModeNotificationSilent

        void setAutoAdaptionModeNotificationSilent(boolean flag)
                                            throws java.lang.Exception
        在设置->电池工作模式的自适应模式下,终端自动切换为桌面模式后,充电到80%时会停止充电并发送停充通知,控制停充通知是否静音。
        In the adaptive mode of setting -> Battery working mode, after the terminal automatically switches to desktop mode, it will stop charging and send a stop charging notification when charging reaches 80%. Control whether the stop charging notification is muted.
        Parameters:
        flag -
        true-表示停充通知静音,false-表示停充通知有声音
        true: The charge stop notification is silent. false: the charge stop notification is audible
        Throws:
        java.lang.Exception
        Since:
        V4.14.00
      • setHighTextContrastEnabled

        void setHighTextContrastEnabled(boolean enable)
                                 throws java.lang.Exception
        设置是否打开无障碍-界面高对比度文字。
        Set whether Accessibility is turned on - Interface high contrast text.
        Parameters:
        enable -
        true - 打开,false 关闭
        true - On, false off
        Throws:
        java.lang.Exception
        Since:
        V4.15.00
      • setAccessibilityDisplayDaltonizerEnabled

        void setAccessibilityDisplayDaltonizerEnabled(boolean enable)
                                               throws java.lang.Exception
        设置是否打开无障碍-色彩校正。
        Set whether to turn on Accessibility - Color correction.
        Parameters:
        enable -
        true - 打开,false 关闭
        true - On, false off
        Throws:
        java.lang.Exception
        Since:
        V4.15.00
      • setAccessibilityDisplayInversionEnabled

        void setAccessibilityDisplayInversionEnabled(boolean enable)
                                              throws java.lang.Exception
        设置是否打开无障碍-颜色反转。
        Set whether to turn on Accessibility - Color inversion.
        Parameters:
        enable -
        true - 打开,false 关闭
        true - On, false off
        Throws:
        java.lang.Exception
        Since:
        V4.15.00
      • setPrivateDns

        void setPrivateDns(java.lang.String dns)
                    throws java.lang.Exception
        用于设置Settings—Network & internet—PrivateDns菜单中的私人DNS主机名
        Used to set the private DNS hostname in the Settings - Network & internet - PrivateDns menu
        Parameters:
        dns -
        私人DNS提供商主机名
        Private DNS provider hostname
        Throws:
        java.lang.Exception
        Since:
        V4.15.00
      • setAgpsServerDomain

        void setAgpsServerDomain(java.lang.String domainName)
                          throws java.lang.Exception
        设置AGPS服务器的域名。
        Set the domain name of the AGPS server.
        Parameters:
        domainName -
        AGPS服务器域名
        AGPS server domain name
        Throws:
        java.lang.Exception
        Since:
        V4.15.00
      • getAgpsServerDomain

        java.lang.String getAgpsServerDomain()
                                      throws java.lang.Exception
        获取AGPS服务器的域名。
        Get the domain name of the AGPS server.
        Returns:
        AGPS服务器域名
        AGPS server domain name
        Throws:
        java.lang.Exception
        Since:
        V4.15.00
      • updateTTSVoices

        int updateTTSVoices(java.lang.String zipFilePath)
                     throws java.lang.Exception
        下载TTS离线语音文件
        Download the TTS offline voice file
        Parameters:
        zipFilePath -
        语音文件压缩包,需PUK签名或固件签名,每次下载都会清除之前的语音包;语音包压缩文件可包含多个国家的语言,文件总大小最大支持50M。
        The compressed package of the voice file requires PUK signature or firmware signature. Each time it is downloaded, the previous voice package will be cleared. The compressed file of the voice package can contain the languages of multiple countries, and the maximum total file size supported is 50M.
        Returns:
        • 0 success
        • -1:unknown
        • -2:不支持
        • -3:文件不存在或不可读
        • -4:压缩包超过50M
        • -5:入参是软链接
        • -6:验签失败
        • -7:非zip文件或解压失败
        • 0 success
        • -1:unknown
        • -2:Not supported
        • -3:The file does not exist or is unreadable
        • -4:The compressed package exceeds 50M
        • -5:Input parameters are soft links
        • -6:The signature verification failed.
        • -7:Non-zip file or decompression failed
        Throws:
        java.lang.Exception
        Since:
        V4.16.00
      • setSoundEffectsEnabled

        void setSoundEffectsEnabled(boolean enabled)
                             throws java.lang.Exception
        设置是否开启触摸提示音
        set whether to enable the touch sound
        Parameters:
        enabled -
        true:开启; false:关闭
        true: enable; false: disable
        Throws:
        java.lang.Exception
        Since:
        V4.17.00
      • isSoundEffectsEnabled

        boolean isSoundEffectsEnabled()
                               throws java.lang.Exception
        获取触摸提示音是否开启
        get whether the touch sound is enabled
        Returns:
        true:开启; false:关闭
        true: enable; false: disable
        Throws:
        java.lang.Exception
        Since:
        V4.17.00
      • setDoubleTapKeyboardPlaySoundCustomized

        void setDoubleTapKeyboardPlaySoundCustomized(boolean enabled)
                                              throws java.lang.Exception
        设置是否由应用播放盲人键盘语音提示。
        Set whether the application plays voice prompts for the blind keyboard.
        Parameters:
        enabled -
        true-应用播放盲人语音提示; false-系统播放盲人语音提示
        true - The application plays voice prompts for the blind; false - The system plays voice prompts for the blind.
        Throws:
        java.lang.Exception
        Since:
        V4.17.00
      • disableVolumeSafetyWarningDialog

        void disableVolumeSafetyWarningDialog(boolean disable)
                                       throws java.lang.Exception
        设置是否显示安全音量警告提醒弹框。
        Set whether to display the safety volume warning reminder pop-up box.
        Parameters:
        disable -
        true - 不弹框,false 弹框
        true - no pop-up box, false - pop-up box
        Throws:
        java.lang.Exception
        Since:
        V4.17.00
      • switchPrivateDNSMode

        void switchPrivateDNSMode(int mode)
                           throws java.lang.Exception
        切换私人DNS模式
        Switch to the private DNS mode
        Parameters:
        mode -
        0-OFF; 1-automatic; 2-PROVIDER_HOSTNAME
        0-OFF; 1-automatic; 2-PROVIDER_HOSTNAME
        Throws:
        java.lang.Exception
        Since:
        V4.17.00
      • setGuestKeyBoardType

        void setGuestKeyBoardType(int type)
                           throws java.lang.Exception
        设置客显屏显示PIN键盘
        Set the guest display screen to show the PIN keyboard
        Parameters:
        type -
        1 - 默认客显屏PIN键盘 2 - 应用自行实现客显屏密码键盘
        1 - Default PIN keyboard on the customer display screen 2 - The application implements the customer display screen PIN keyboard by itself
        Throws:
        java.lang.Exception
        Since:
        V4.18.00
      • verifySign

        int verifySign(java.lang.String filePath,
                       int fileType,
                       int pukType,
                       byte[] puk)
                throws java.lang.Exception
        应用配置文件和脚本文件的验签。
        Verification of application configuration files and script files.
        Parameters:
        filePath -
        • 文件的绝对路径。
        • The absolute path of the file.
        fileType -
        文件类型,应用配置文件和脚本文件固定为0x59 。
        The file type, application configuration file and script file are fixed as 0x59.
        pukType -
        1:使用终端当前的US PUK对文件进行验证 2: 使用参数puk对文件进行验证 。
        1: Verify the file using the current US PUK of the terminal. 2: Verify the file using the parameter puk.
        puk -
        pukType为2时,使用此puk验证文件; pukType为其他值时忽略此参数 。
        When pukType is 2, use this puk to verify the file; when pukType has other values, ignore this parameter.
        Returns:
        • >0: 去掉签名数据后的原始文件长度 ;<=0: 验签失败。
        • > 0: Length of the original file after removing signature data; <= 0: Signature verification failed.
        Throws:
        java.lang.Exception
        Since:
        V4.18.00
      • disableCamera

        void disableCamera(boolean disable)
                    throws java.lang.Exception
        设置是否禁用摄像头功能
        Set whether to disable the camera function.
        Parameters:
        disable -
        true:禁用 false:开启
        true: Disable false: Enable
        Throws:
        java.lang.Exception
        Since:
        V4.18.00
      • setAntMode

        void setAntMode(int antMode)
                 throws java.lang.Exception
        设置天线模式
        set antenna mode
        Parameters:
        antMode -
        天线模式:0 内置天线模式; 1 外置天线模式; 2 混合天线模式
        antMode:0 internal antenna mode; 1 external antenna mode; 2 mixed antenna mode
        Throws:
        java.lang.Exception
        Since:
        V4.18.00
      • getAntMode

        int getAntMode()
                throws java.lang.Exception
        获取天线模式
        get antenna mode
        Returns:
        天线模式:0 内置天线模式;1 外置天线模式; 2 混合天线模式
        antMode:0 internal antenna mode; 1 external antenna mode; 2 mixed antenna mode
        Throws:
        java.lang.Exception
        Since:
        V4.18.00
      • controlTaxPower

        void controlTaxPower(int mode,
                             boolean on)
                      throws java.lang.Exception
        税控模块上电接口。
        Power-on interface of the tax control module.
        Parameters:
        mode -
        0-USB税控模块;1-串口税控模块
        0 - USB tax control module; 1 - Serial port tax control module.
        on -
        true-上电; false-下电
        true - power on; false - power off.
        Throws:
        java.lang.Exception
        Since:
        V4.18.00
      • setQuickLaunch

        void setQuickLaunch(java.lang.String name,
                            java.lang.String value)
                     throws java.lang.Exception
        设置快捷启动方式。
        Set up a quick launch method.
        Parameters:
        name -
        快捷功能,当前支持如下:"quick_camera_disabled" 熄屏双击音量加启动相机应用
        Quick functions currently supported: "quick_camera_disabled" Double-click the volume up button on the locked screen to launch the camera app.
        value -
        "quick_camera_disabled" 对应选项: "1"-禁止唤醒;"0"-恢复唤醒
        "quick_camera_disabled": "1" - Prohibit wake-up; "0" - Restore wake-up.
        Throws:
        java.lang.Exception
        Since:
        V4.18.00
      • getSystemComponentVersion

        java.lang.String getSystemComponentVersion(java.lang.String componentName)
                                            throws java.lang.Exception
        获取设备相关版本信息
        Obtain device-related version information
        Parameters:
        componentName -
        "modem": 获取modem版本信息
        "modem": Obtain modem version information
        Returns:
        相关版本信息
        Relevant version information
        Throws:
        java.lang.Exception - Exception
        Since:
        V4.18.00
      • setCurrentKeyboardLayoutForInputDevice

        void setCurrentKeyboardLayoutForInputDevice(java.lang.String keyboardLayoutDescriptor)
                                             throws java.lang.Exception
        设置当前物理键盘布局
        set the current physical keyboard layout
        Parameters:
        keyboardLayoutDescriptor -
        键盘描述字符
        physical keyboard description character
        Throws:
        java.lang.Exception - Exception
      • getCurrentKeyboardLayoutForInputDevice

        java.lang.String getCurrentKeyboardLayoutForInputDevice()
                                                         throws java.lang.Exception
        获取当前物理键盘布局
        get the current physical keyboard layout
        Throws:
        java.lang.Exception - Exception
      • updateTTSVoices

        int updateTTSVoices(int mode,
                            java.lang.String path)
                     throws java.lang.Exception
        下载TTS离线语音文件
        Download the TTS offline voice file
        Parameters:
        mode -
        0: 增量下载语音包 1: 删除语音包。
        0: Incrementally download voice packs 1: Delete voice packs.
        path -
        模式0时,语音包的路径,需PUK签名或固件签名,文件总大小不超过50M;模式1时,请使用/data/resource/tts下的目录名,删除对应语音包。
        When in Mode 0, the path of the voice package requires PUK signature or firmware signature, and the total file size should not exceed 50M. When in Mode 1, please use the directory name under /data/resource/tts and delete the corresponding voice package.
        Returns:
        • 0 success
        • -1:unknown
        • -2:不支持
        • -3:文件不存在或不可读
        • -4:压缩包超过50M
        • -5:入参是软链接
        • -6:验签失败
        • -7:非zip文件或解压失败
        • -8 需删除的语音文件不存在
        • -9 参数非法
        • 0 success
        • -1:unknown
        • -2:Not supported
        • -3:The file does not exist or is unreadable
        • -4:The compressed package exceeds 50M
        • -5:Input parameters are soft links
        • -6:The signature verification failed.
        • -7:Non-zip file or decompression failed
        • -8 The voice file to be deleted does not exist
        • -9 Illegal parameter
        Throws:
        java.lang.Exception - Exception
        Since:
        V4.18.00