How to Set Display Sleep Mode on the Terminal: Difference between revisions

From wizarPOS
No edit summary
Line 5: Line 5:
== API Function ==
== API Function ==
=== <big>Set Screen Off Timeout</big> ===
=== <big>Set Screen Off Timeout</big> ===
* ''''boolean setScreenOffTimeout(int milliseconds)'''';
  <syntaxhighlight lang="java">boolean setScreenOffTimeout(int milliseconds);</syntaxhighlight>
* Configure the display sleep time by specifying the timeout duration in milliseconds.
* Configure the display sleep time by specifying the timeout duration in milliseconds.
{|class="wizarpostable"
{|class="wizarpostable"

Revision as of 15:11, 4 January 2024

Interface and Class Information

  • Package Name: 'com.wizarpos.wizarviewagentassistant'
  • Class Name: 'com.wizarpos.wizarviewagentassistant.SystemExtApiService'
  • Import the 'wizarviewagentassistant' package when using this interface.

API Function

Set Screen Off Timeout

boolean setScreenOffTimeout(int milliseconds);
  • Configure the display sleep time by specifying the timeout duration in milliseconds.
Parameters
milliseconds int: milliseconds the time you want to set, can be one of following:
*        15000 - 15s
*        30000 - 30s
*        60000 - 1 minute
*        120000 - 2 minutes
*        300000 - 5 minutes
*        600000 - 10 minutes
*        1800000 - 30 minutes
*        2147483647(Integer.MAX_VALUE) - never.
Returns
boolean whether the new milliseconds has been set.

Resource Download

  • Download the necessary AIDL file for implementation.