之前接过百度实名认证,特简单,相比之下百度的离线人脸采集要麻烦的多。
说一下步骤吧
1.去官网下载SDK和认证文件,项目中位置如下 assets 下为认证文件
2.settings.gradle 中添加两行代码:
include ':app'
include ':faceplatform-release'
include ':faceplatform-ui'
3.自己项目名\app\build.gradle 中添加一行代码
dependencies {
---------
---------------
------------
compile project(path: ':faceplatform-ui')
}
4.首页初始化 MainActivity:
private fun initFaceSDK() {
FaceSDKManager.getInstance().initialize(this,mUtils.licenseID, mUtils.licenseFileName,
object : IInitCallback {
override fun initFailure(p0: Int, p1: String?) {
}
override fun initSuccess() {
}
});
}