How to Update User Role Passwords Using API: Difference between revisions
Line 51: | Line 51: | ||
=== <big>enableUserLogin</big> === | === <big>enableUserLogin</big> === | ||
<syntaxhighlight lang="java">boolean enableUserLogin(boolean eneable);</syntaxhighlight> | <syntaxhighlight lang="java">boolean enableUserLogin(boolean eneable);</syntaxhighlight> | ||
Enable | Enable user role. | ||
{|class="wizarpostable" | {|class="wizarpostable" |
Revision as of 02:20, 28 September 2023
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.
Permission
The application declares the following permissions in the manifest:
* android.permission.USER_PWD * android.permission.USER_PWD_MODIFY
API Overview
isUserPwd
boolean isUserPwd(String pwd);
Check whether the pwd is the user password.
Parameters | |
---|---|
pwd | String: Not null. |
Returns | |
---|---|
boolean | true of false. |
forceModifyUserPwd
boolean forceModifyUserPwd(String newPwd);
Modify the user role password.
Parameters | |
---|---|
newPwd | String: Not null. |
Returns | |
---|---|
boolean | true of false. |
enableUserLogin
boolean enableUserLogin(boolean eneable);
Enable user role.
Parameters | |
---|---|
name | boolean: true to enable, false to disable. |
Returns | |
---|---|
boolean | true of false. |
Snippet code:
<!-- 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");
Download
AIDL file
Please download the aidl file