|
|
Line 1: |
Line 1: |
| === AIDL Interface for Managing Terminal Administrator Passwords ===
| | {{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/settings-menu/change-administrators-login-password}} |
| == Required Permissions ==
| |
| * Applications must declare the specified permissions in their manifest to use this AIDL interface.
| |
| {| class="wikitable" | |
| |-
| |
| ! Permission !! Function
| |
| |-
| |
| | android.permission.ADMIN_PWD_MODIFY|| modify admin password
| |
| |-
| |
| | android.permission.ADMIN_PWD|| get admin password
| |
| |-
| |
| | android.permission.ADMIN_PWD_RESET|| reset admin password
| |
| |}
| |
| == API Overview ==
| |
| === <big>Modify Admin Password</big> ===
| |
| <syntaxhighlight lang="java">boolean modifyAdminPwd(String oldPwd, String newPwd);</syntaxhighlight >
| |
| * This function allows the modification of the admin password. Provide the current password (''''oldPwd'''') and the new password (''''newPwd'''') as arguments.
| |
| {|class="wizarpostable"
| |
| |-
| |
| ! scope="row" colspan="2" | Parameters
| |
| |-
| |
| | oldPwd || '''String:''' old admin password.
| |
| |-
| |
| | newPwd || '''String:''' new admin password.
| |
| |-
| |
| ! scope="row" colspan="2" | Returns
| |
| |-
| |
| | boolean || true is success, false is failure.
| |
| |}
| |
| === <big>Check Admin Password</big> ===
| |
| <syntaxhighlight lang="java">boolean isAdminPwd(String pwd);</syntaxhighlight >
| |
| * Returns ''''true'''' if the provided password (''''pwd'''') matches the current admin password.
| |
| {|class="wizarpostable"
| |
| |-
| |
| ! scope="row" colspan="2" | Parameters
| |
| |-
| |
| | pwd || '''String:''' admin password.
| |
| |-
| |
| ! scope="row" colspan="2" | Returns
| |
| |-
| |
| | boolean || true is success, false is failure.
| |
| |}
| |
| === <big>Reset Password (System APK Only)</big> ===
| |
| <syntaxhighlight lang="java">boolean reset(String pwd);</syntaxhighlight >
| |
| * Resets the admin password. Due to security reasons, this method is exclusive to system APKs and cannot be called by third-party apps.
| |
| {|class="wizarpostable"
| |
| |-
| |
| ! scope="row" colspan="2" | Parameters
| |
| |-
| |
| | pwd || '''String:''' the real admin password.
| |
| |-
| |
| ! scope="row" colspan="2" | Returns
| |
| |-
| |
| | boolean || true is success, false is failure.
| |
| |}
| |
| == Project Demo Download ==
| |
| * To implement these features, please download the [http://ftp.wizarpos.com/advanceSDK/AdminPwdDemo_as.zip complete project demo].
| |