How to Turn Off the Terminal Using the AIDL Interface: Difference between revisions

From wizarPOS
No edit summary
Line 7: Line 7:
== API Function ==
== API Function ==
=== <big>Shutdown</big> ===
=== <big>Shutdown</big> ===
* ''''boolean shutdown(boolean confirm, boolean wait)'''';
  <syntaxhighlight lang="java">boolean shutdown(boolean confirm, boolean wait);</syntaxhighlight>
* Turns off the terminal. The ''''confirm'''' parameter decides if confirmation is needed, and ''''wait'''' specifies whether to wait for shutdown completion.
* Turns off the terminal. The ''''confirm'''' parameter decides if confirmation is needed, and ''''wait'''' specifies whether to wait for shutdown completion.
{|class="wizarpostable"
{|class="wizarpostable"

Revision as of 15:02, 4 January 2024

Interface and Class Information

  • Package Name: 'com.wizarpos.wizarviewagentassistant'
  • Class Name: 'com.wizarpos.wizarviewagentassistant.SilenceService'
  • Import 'wizarviewagentassistant' when using this interface.

Required Permissions

Add the following permission to your application's manifest: 'android.permission.CLOUDPOS_REBOOT'

API Function

Shutdown

boolean shutdown(boolean confirm, boolean wait);
  • Turns off the terminal. The 'confirm' parameter decides if confirmation is needed, and 'wait' specifies whether to wait for shutdown completion.
Parameters
confirm boolean: true/false. If true, shows a shutdown confirmation dialog.
wait boolean: true/false. If true, this call waits for the shutdown to complete and does not return, it's sychronized, that means it will not return from this method if set ture. If false, it's asynchronized, it will return.
Returns
boolean whether success.

Resource Download

  • AIDL File: Download the necessary AIDL file for implementation.
  • Service Binding Demo: Refer to the demo provided in the How to set APN guide for details on how to bind the service.