Turn Off Terminal API

Required Permissions

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

API Function

Shutdown

boolean shutdown(boolean confirm, String reason, 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

if true, shows a shutdown confirmation dialog.

reason

code to pass to android_reboot() (e.g. "userrequested"), or null.

wait

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

a boolean representation of the result.

true if success. false if failure.

Resource Download

  • Refer to the cloudpos apidemo - demo.

Last updated