|
|
(10 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]
| |