.NET(C#、VB)APP开发——Smobiler平台控件介绍:FingerPrint指纹识别组件

本文简述如何在Smobiler中使用FingerPrint。

Step 1. 新建一个SmobilerForm窗体,并在窗体中加入FingerPrint和Button,布局如下

Button的点击事件代码:

        private void button1_Press_1(object sender, EventArgs e)
        {
            // 判断是否支持指纹验证
            fingerPrint1.isSensorAvailable((obj, args) =>
            {
                if (args.isError == true)
                    Toast("该设备不支持指纹登录");
                else
                {
                    //验证指纹
                    fingerPrint1.authenticate((obj1, args1) =>
                    {
                        if (args1.isError == true)
                            this.Toast(args1.error);
                        else
                        {
                            this.Toast("指纹识别成功");
                        }
                    });
                }
            });
        }

Step 2. 运行服务端后,手机上安装官网的调试工具进行测试,效果如下

若是使用云平台上自行打包的客户端, 需要添加相应插件后再打包客户端。

补充

FingerPrint是拿不到指纹数据,只能拿到指纹验证得到结果。

posted on 2022-11-21 13:09  smobiler  阅读(149)  评论(0编辑  收藏  举报

导航