|
|
(4 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| == Interface Details ==
| | {{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/settings-menu/update-role-passwords-api}} |
| * Package Name: ''''com.wizarpos.wizarviewagentassistant''''
| |
| * Class Name: ''''com.wizarpos.wizarviewagentassistant.AdminPwdMainService''''
| |
| * Before using the interface, ensure the package is imported and necessary permissions are added to the Android manifest file.
| |
| == Required Permissions ==
| |
| * Include the following permissions in your application's manifest:
| |
| ** ''''android.permission.USER_PWD'''':query password of user role.
| |
| ** ''''android.permission.USER_PWD_MODIFY'''': modify password of user role.
| |
| | |
| == API Functions ==
| |
| === <big>isUserPwd</big> ===
| |
| <syntaxhighlight lang="java">boolean isUserPwd(String pwd);</syntaxhighlight>
| |
| * Checks if the provided string (''''pwd'''') is the current 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>
| |
| * Modifies the user role password to the new password (''''newPwd'''').
| |
| {|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>
| |
| * Enables or disables user role login based on the boolean value (''''enable'''').
| |
| {|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.
| |
| |}
| |
| == Code Snippet and AIDL File ==
| |
| * Access the necessary code snippets and [http://ftp.wizarpos.com/advanceSDK/IModifyAdminPwdService.aidl download the AIDL file] for implementation.
| |
| <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 >
| |