How to Set User System Properties: Difference between revisions

From wizarPOS
No edit summary
Line 15: Line 15:
! scope="row" colspan="2" | Parameters
! scope="row" colspan="2" | Parameters
|-
|-
| key|| '''String:'''  property's key, length less than 16. for example: persist.wp.usr.${key} ${value}.  
| key|| '''String:'''  Property's key, must be less than 16 characters long and start with "persist.wp.usr.". For example, a valid key could be "persist.wp.usr.setting1".
|-
|-
| value|| '''String:'''  property's value, length less than 32.   
| value|| '''String:'''  Property's value, must be less than 32 characters long.   
|}
 
{|class="wizarpostable"
|-
|-
!  scope="row" colspan="2" | Returns
!  scope="row" colspan="2" | Returns
Line 26: Line 23:
|  boolean || true or false.
|  boolean || true or false.
|}
|}
== Resources ==
== Resources ==
# '''AIDL File:'''
# '''AIDL File:'''

Revision as of 09:29, 5 January 2024

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

setUsrProp

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, must be less than 16 characters long and start with "persist.wp.usr.". For example, a valid key could be "persist.wp.usr.setting1".
value String: Property's value, must be less than 32 characters long.
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.