Fingerprint scheme of Aegis
In the Java layer, the aegis mainly provides several packages as follows:
Egistec.fingerauth.api.FPAuthListeners;
Egistec.fingerauth.api.FPAuthListeners.EnrollListener;
Egistec.fingerauth.api.FPAuthListeners.EnrollMapProgressListener;
Egistec.fingerauth.api.FPAuthListeners.StatusListener;
Egistec.fingerauth.api.SettingLib;
Specific use,
1) Provide fingerprint-related functions by generating Settinglib objects
MLib = new Settinglib (Context);
2) Set 3 commonly used listener,
Fpauthlisteners.enrolllistener//Fingerprint entry stage get notify, the method will be callback
Fpauthlisteners.statuslistener//When the status of the fingerprint sensor changes, it will be notify
Fpauthlisteners.enrollmapprogresslistener//Fingerprint input (there are 10 stages), each stage input completion will be called once
Specific as follows:
Fpauthlisteners.enrolllistener () {
public void Onfail () {
}
public void OnProgress () {
}
public void Ondoublecheckedfail () {
}
public void onsuccess () {
}
}
Fpauthlisteners.statuslistener () {
public void onbadimage (int status) {
}
public void Onfingerfetch () {
}
public void onfingerimagegetted () {
}
public void onserviceconnected () {
}
public void onservicedisconnected () {
}
public void onstatus (int status) {
}
public void Onuserabort () {
}
}
Fpauthlisteners.enrollmapprogresslistener () {
public void onenrollmapprogress (int progress) {
}
}
3) bind to Settinglib,mlib.bind ();
4) End of service:
Mlib.abort ();
Mlib.disconnectdevice ();
Mlib.cleanlisteners ();
Mlib.unbind ();
5) Typical function call:
A. Enroll Fingerprint: Fingerprint entry
Mlib.setstatuslistener (New Fpauthlisteners.statuslistener () {
public void onserviceconnected () {
Mlib.enroll ("Fp_0" + mfingerindex);
}
});
Lib.bind ();
B. Delete fingerprint: Delete fingerprint template
Lib.setstatuslistener (New Fpauthlisteners.statuslistener () {
public void onserviceconnected () {
Boolean result = Lib.deletefeature (UID);
}
});
Lib.bind ();
C. Remove calibration: Fingerprint calibration
Lib.setstatuslistener (New Fpauthlisteners.statuslistener () {
public void onserviceconnected () {
Lib.connectdevice ();
Lib.removecalibration ();
Lib.disconnectdevice ();
}
});
Lib.bind ();
6. For the preservation of fingerprint data, by the aegis of the completion, we can not see the data collection and preservation process; We only save a row of fingerprint_* as key in Settings.system, and a value of 1 means data_exsit = 1, the data exists.
The name of the fingerprint is similar to: fingerprint_title*
Anroid Platform Fingerprint scheme