How to Change the Terminal Administrator's Login Password: Difference between revisions

From wizarPOS
No edit summary
No edit summary
Line 1: Line 1:
An AIDL interface that is open to applications to manage terminal administrator passwords.
=== AIDL Interface for Managing Terminal Administrator Passwords ===
== Permission ==
== Required Permissions ==
The application declares the following permissions in the manifest:
* Applications must declare the specified permissions in their manifest to use this AIDL interface.
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 12: Line 12:
| android.permission.ADMIN_PWD_RESET|| reset admin password
| android.permission.ADMIN_PWD_RESET|| reset admin password
|}
|}
 
== API Overview ==
== API Overview==
* '''Modify Admin Password'''
=== <big>Modify</big> ===
** ''''boolean modifyAdminPwd(String oldPwd, String newPwd)'''';
  <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.
Modifies admin password.
 
{|class="wizarpostable"
{|class="wizarpostable"
|-
|-
Line 36: Line 34:
|  boolean || true is success, false is failure.
|  boolean || true is success, false is failure.
|}
|}
 
* '''Check Admin Password'''
=== <big>Is admin password</big>===
** ''''boolean isAdminPwd(String pwd)'''';
  <syntaxhighlight lang="java">boolean isAdminPwd(String pwd);</syntaxhighlight >
*** Returns ''''true'''' if the provided password (''''pwd'''') matches the current admin password.
Returns true if the parameter pwd is the real admin password.
 
{|class="wizarpostable"
{|class="wizarpostable"
|-
|-
Line 57: Line 53:
|  boolean || true is success, false is failure.
|  boolean || true is success, false is failure.
|}
|}
 
* '''Reset Password (System APK Only)'''
=== <big>Reset For system apk</big> ===
** ''''boolean reset(String pwd)'''';
  <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.
Resets admin password. '''For security reason, third-app can not call this method. The method is only for system apk.'''
 
{|class="wizarpostable"
{|class="wizarpostable"
|-
|-
Line 78: Line 72:
|  boolean || true is success, false is failure.
|  boolean || true is success, false is failure.
|}
|}
 
== Project Demo Download ==
== Download ==
* To implement these features, please download the [http://ftp.wizarpos.com/advanceSDK/AdminPwdDemo_as.zip complete project demo].
Please download the [http://ftp.wizarpos.com/advanceSDK/AdminPwdDemo_as.zip whole project demo]

Revision as of 18:11, 29 December 2023

AIDL Interface for Managing Terminal Administrator Passwords

Required Permissions

  • Applications must declare the specified permissions in their manifest to use this AIDL interface.
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

  • Modify Admin Password
    • 'boolean modifyAdminPwd(String oldPwd, String newPwd)';
      • This function allows the modification of the admin password. Provide the current password ('oldPwd') and the new password ('newPwd') as arguments.
Parameters
oldPwd String: old admin password.
newPwd String: new admin password.
Returns
boolean true is success, false is failure.
  • Check Admin Password
    • 'boolean isAdminPwd(String pwd)';
      • Returns 'true' if the provided password ('pwd') matches the current admin password.
Parameters
pwd String: admin password.
Returns
boolean true is success, false is failure.
  • Reset Password (System APK Only)
    • 'boolean reset(String pwd)';
      • Resets the admin password. Due to security reasons, this method is exclusive to system APKs and cannot be called by third-party apps.
Parameters
pwd String: the real admin password.
Returns
boolean true is success, false is failure.

Project Demo Download