How to Block and Capture Power Button Events Using AIDL Interface: Difference between revisions

From wizarPOS
(Created page with "The system provides the AIDL interface to block and get the power. When connect the service, the package name is com.wizarpos.wizarviewagentassistant, and the class name is co...")
 
(Replaced content with "{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/other-development/capture-power-button-api}}")
Tag: Replaced
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
The system provides the AIDL interface to block and get the power. When connect the service, the package name is com.wizarpos.wizarviewagentassistant, and the class name is com.wizarpos.wizarviewagentassistant.SystemExtApiService. When the application uses the interface, it must import wizarviewagentassistant and add permissions to the Android manifest file.
{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/other-development/capture-power-button-api}}
 
Version of wizarviewagentassistant should equal or larger than 2.10.59. System version, Q2P:S0397, Q2A7:S51099,S0397,Q3V:S1524,Q2:S4957
== Permission ==
The application declares the following permissions in the manifest:
  android.permission.CLOUDPOS_DISABLE_POWER_KEY
 
== API Overview ==
=== <big>blockPowerKey</big>===
  <syntaxhighlight lang="java">void setPowerKeyBlocked(boolean enable);</syntaxhighlight>
Block or release the power button.
 
{|class="wizarpostable"
|-
! scope="row" colspan="2" | Parameters
|-
| enbale|| '''boolean:'''  true:block The power button; false:release the Power button ;
|}
=== <big>isPowerKeyBlocked</big>===
  <syntaxhighlight lang="java">boolean isPowerKeyBlocked();</syntaxhighlight>
Check whether power button has been blocked.
 
{|class="wizarpostable"
|-
! scope="row" colspan="2" | Returns
|-
| enbale|| '''boolean:'''  true:blocked; false:released ;
|}
 
== Download ==
=== AIDL file ===
Please download the [http://ftp.wizarpos.com/advanceSDK/ISystemExtApi.aidl aidl file]
=== Demo ===
Please download the [http://ftp.wizarpos.com/advanceSDK/example_blockgetpowerbutton.7z demo APP]

Latest revision as of 03:25, 8 April 2024

Please visit new link of same subject:

https://smartpossdk.gitbook.io/cloudpossdk/faq/other-development/capture-power-button-api

We're making a move! Our site's content is migrating to a new URL, to provide you with an enhanced browsing experience. Please update your bookmarks accordingly. Thank you for your continuous support!