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

From wizarPOS
(Replaced content with "{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/other-development/capture-power-button-api}}")
Tag: Replaced
 
Line 1: Line 1:
== Overview ==
{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/other-development/capture-power-button-api}}
This guide provides instructions on using the Android Interface Definition Language (AIDL) to block and capture power button events on Android devices. This functionality is useful for controlling how the power button behaves in your application.
== Implementation Steps ==
# '''Connecting to the Service:'''
#* To utilize this feature, connect to the AIDL service.
#* Use ''''com.wizarpos.wizarviewagentassistant'''' as the package name.
#* Set ''''com.wizarpos.wizarviewagentassistant.SystemExtApiService'''' as the class name.
# '''Importing and Permissions:'''
#* Import the ''''wizarviewagentassistant'''' into your application.
#* Add the necessary permissions to your app’s Android manifest file to use this interface effectively.
# '''Version Requirements:'''
#* Ensure that the version of ''''wizarviewagentassistant'''' in your application is version 2.10.59 or higher.
#* Compatible system versions include Q2P: S0397, Q2A7: S51099, S0397, Q3V: S1524, and 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!