How to Update User Role Passwords Using API: Difference between revisions

From wizarPOS
(Replaced content with "{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/settings-menu/update-role-passwords-api}}")
Tag: Replaced
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The system provides the AIDL interface to update the user role password. The package name is '''com.wizarpos.wizarviewagentassistant''', and the class name is '''com.wizarpos.wizarviewagentassistant.AdminPwdMainService'''. When the application uses the interface, it must import the package and add permissions to the Android manifest file.
{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/settings-menu/update-role-passwords-api}}
 
== Permission ==
The application declares the following permissions in the manifest:
  * android.permission.USER_PWD
  * android.permission.USER_PWD_MODIFY
 
== API Overview ==
=== <big>isUserPwd</big>===
  <syntaxhighlight lang="java">boolean isUserPwd(String pwd);</syntaxhighlight>
Check whether the pwd is the user password.
 
{|class="wizarpostable"
|-
! scope="row" colspan="2" | Parameters
|-
| pwd || '''String:''' Not null.
|}
{|
|-
|}
{|class="wizarpostable"
|-
!  scope="row" colspan="2" | Returns
|-
|  boolean || true of false.
|}
 
=== <big>forceModifyUserPwd</big>===
  <syntaxhighlight lang="java">boolean forceModifyUserPwd(String newPwd);</syntaxhighlight>
Modify the user role password.
 
{|class="wizarpostable"
|-
! scope="row" colspan="2" | Parameters
|-
| newPwd ||  '''String:''' Not null.
|}
{|
|-
|}
{|class="wizarpostable"
|-
!  scope="row" colspan="2" | Returns
|-
|  boolean || true of false.
|}
 
=== <big>enableUserLogin</big> ===
  <syntaxhighlight lang="java">boolean enableUserLogin(boolean eneable);</syntaxhighlight>
Enable user role.
 
{|class="wizarpostable"
|-
! scope="row" colspan="2" | Parameters
|-
| name || '''boolean:''' true to enable, false to disable.
|}
{|
|-
|}
{|class="wizarpostable"
|-
!  scope="row" colspan="2" | Returns
|-
|  boolean || true of false.
|}
 
 
<big>Snippet code:</big>
<syntaxhighlight lang="java">
<!-- AdminPwdMainService -->
<uses-permission android:name="android.permission.USER_PWD"/>
<uses-permission android:name="android.permission.USER_PWD_MODIFY"/>
 
boolean result = adminPwdService.forceModifyUserPwd(newPwd);
boolean isUserPwd = adminPwdService.isUserPwd(newPwd);
 
ComponentName comp = new ComponentName (
        "com.wizarpos.wizarviewagentassistant",
        "com.wizarpos.wizarviewagentassistant.AdminPwdMainService");
 
</syntaxhighlight >
 
== Download ==
=== AIDL file ===
Please download the [http://ftp.wizarpos.com/advanceSDK/IModifyAdminPwdService.aidl aidl file]

Latest revision as of 08:55, 7 April 2024

Please visit new link of same subject:

https://smartpossdk.gitbook.io/cloudpossdk/faq/settings-menu/update-role-passwords-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!