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

From wizarPOS
No edit summary
No edit summary
Line 15: Line 15:
== API Overview==
== API Overview==
=== <big>modify</big> ===
=== <big>modify</big> ===
   boolean modifyAdminPwd(String oldPwd, String newPwd);
   <syntaxhighlight lang="java">boolean modifyAdminPwd(String oldPwd, String newPwd);</syntaxhighlight >
Modify admin password.
Modify admin password.


Line 39: Line 39:


=== <big>is admin password</big>===
=== <big>is admin password</big>===
  boolean isAdminPwd(String pwd);
  <syntaxhighlight lang="java">boolean isAdminPwd(String pwd);</syntaxhighlight >
Returned true if the pwd is the real admin password.
Returned true if the pwd is the real admin password.


Line 61: Line 61:


=== <big>reset</big> ===
=== <big>reset</big> ===
   boolean reset(String pwd);
   <syntaxhighlight lang="java">boolean reset(String pwd);</syntaxhighlight >
Reset admin password.
Reset admin password.



Revision as of 06:56, 4 May 2018

Provide the AIDL interface to help the third-party app to manage the admin password.

Permission

The app declares the follow permission in the manifest.

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

boolean modifyAdminPwd(String oldPwd, String newPwd);

Modify admin password.

Parameters
oldPwd String: old admin password.
newPwd String: new admin password.
Returns
boolean true is success, false is failure.


is admin password

boolean isAdminPwd(String pwd);

Returned true if the pwd is the real admin password.

Parameters
pwd String: admin password.
Returns
boolean true is success, false is failure.


reset

boolean reset(String pwd);

Reset admin password.

Parameters
pwd String: the real admin password.
Returns
boolean true is success, false is failure.


Download

Please download the whold project demo