BG系列产品 指纹接口 英文文API接口文档地址:

Fingerprint interface

simple description
  • Fingerprint power interface
1. method
  • EnableFingerpint(String key,boolean enable);
Call method
  • SystemProperties.EnableFingerpint(String key,boolean enable);
parameter
parameter namenecessarytypeDescription
keyyesstringThe key value of the corresponding module
enableyesbooleanpower on or off
Call example (to facilitate third-party application calls, use reflection to obtain SystemProperties)
    setEnable("finger",true);  "finger" is fingerprint KEY

    public static void setEnable(final String key, final boolean def) {
        try {
            if (getinfor == null) {
                getinfor = Class.forName("android.os.SystemProperties")
                        .getMethod("EnableFingerpint", String.class,boolean.class);
            }
             getinfor.invoke(null, key,def) ;
        } catch (Exception e) {
           e.printStackTrace();
        }
    }
2 .Get module status interface
method
  • ReadFingerpint(String key);
Call method
  • SystemProperties.ReadFingerpint(String key);
parameter namenecessarytypeDescription
keyyesstringThe key value of the corresponding module
Call example (to facilitate third-party application calls, use reflection to obtain SystemProperties)
   int statu = test("finger","-1")  "finger" is fingerprint KEY

   public static String test(final String key,String def) {
        try {

            if (Getfingerpint == null) {
                Getfingerpint = Class.forName("android.os.SystemProperties")
                        .getMethod("ReadFingerpint", String.class);
            }
            return ((String) Getfingerpint.invoke(null, key)).toString();
        } catch (Exception e) {
             e.printStackTrace();
        }
        return  def;
    }
Return parameter description
parameter nametypeDescription
statuintReturn value, 1 means power-on state 0 means power-off state
BG系列产品 指纹接口 英文文API接口文档地址:

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

滚动到顶部