How to Set User System Properties: Difference between revisions

From wizarPOS
(Created page with "The system provides the AIDL interface to set the user system property, When connect the service, the package name is com.wizarpos.wizarviewagentassistant, and the class name...")
 
No edit summary
Line 1: Line 1:
The system provides the AIDL interface to set the user system property, 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.
== System Interface ==
 
* AIDL Interface: The system provides an AIDL interface for setting user system properties.
Version of wizarviewagentassistant should equal or larger than 2.10.54.
* '''Service Connection:'''
== Permission ==
** '''Package Name''': ''''com.wizarpos.wizarviewagentassistant''''
The application declares the following permissions in the manifest:
** '''Class Name''': ''''com.wizarpos.wizarviewagentassistant.SystemExtApiService''''
  android.permission.CLOUDPOS_SET_PROP
* '''Version Requirement:''' Ensure ''''wizarviewagentassistant'''' is version 2.10.54 or higher.
 
== Permissions ==
== API Overview ==
* '''Manifest Declaration:''' Applications must declare ''''android.permission.CLOUDPOS_SET_PROP'''' in their Android manifest file.
=== <big>setUsrProp</big>===
== API Usage ==
  <syntaxhighlight lang="java">boolean setUsrProp(String key, String value);</syntaxhighlight>
* Function: ''''setUsrProp''''
Set custom system property, the system can only support 10 group of key-values.
** Prototype: ''''boolean setUsrProp(String key, String value)'''';
 
** Purpose: Sets custom system properties. Note that the system supports up to 10 groups of key-value pairs.
{|class="wizarpostable"
{|class="wizarpostable"
|-
|-
Line 26: Line 26:
|  boolean || true or false.
|  boolean || true or false.
|}
|}
== Download ==
== Resources ==
=== AIDL file ===
# '''AIDL File:'''
Please download the [http://ftp.wizarpos.com/advanceSDK/ISystemExtApi.aidl aidl file]
#* Download the required [http://ftp.wizarpos.com/advanceSDK/ISystemExtApi.aidl AIDL file] for implementation.
=== Demo ===
# '''Demo Application:'''
Please download the [http://ftp.wizarpos.com/advanceSDK/sample_setcustomsystemprop.7z demo APP]
#* Download the [http://ftp.wizarpos.com/advanceSDK/sample_setcustomsystemprop.7z Demo APP] for practical reference and guidance.

Revision as of 18:50, 28 December 2023

System Interface

  • AIDL Interface: The system provides an AIDL interface for setting user system properties.
  • Service Connection:
    • Package Name: 'com.wizarpos.wizarviewagentassistant'
    • Class Name: 'com.wizarpos.wizarviewagentassistant.SystemExtApiService'
  • Version Requirement: Ensure 'wizarviewagentassistant' is version 2.10.54 or higher.

Permissions

  • Manifest Declaration: Applications must declare 'android.permission.CLOUDPOS_SET_PROP' in their Android manifest file.

API Usage

  • Function: 'setUsrProp'
    • Prototype: 'boolean setUsrProp(String key, String value)';
    • Purpose: Sets custom system properties. Note that the system supports up to 10 groups of key-value pairs.
Parameters
key String: property's key, length less than 16. for example: persist.wp.usr.${key} ${value}.
value String: property's value, length less than 32.
Returns
boolean true or false.

Resources

  1. AIDL File:
    • Download the required AIDL file for implementation.
  2. Demo Application:
    • Download the Demo APP for practical reference and guidance.