How to Turn Off the Terminal Using the AIDL Interface

From wizarPOS

The system provides the AIDL interface to turn off terminal, When connect the service, the package name is com.wizarpos.wizarviewagentassistant, and the class name is com.wizarpos.wizarviewagentassistant.SilenceService. When the application uses the interface, it must import wizarviewagentassistant and add permissions to the Android manifest file.

Permission

The application declares the following permissions in the manifest:

 android.permission.CLOUDPOS_REBOOT

API Overview

shutdown

boolean shutdown(boolean confirm, boolean wait);

Turn off terminal.

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.

Download

AIDL file

Please download the AIDL file. About how to bind service, please refer to the demo in How to set APN.