Commit e9571a6b authored by shiyl's avatar shiyl

对认证相关的拍照对身份证识别的逻辑进行异常捕获并上报

parent 21e3394a
...@@ -15,6 +15,7 @@ import androidx.core.content.ContextCompat ...@@ -15,6 +15,7 @@ import androidx.core.content.ContextCompat
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import com.tbruyelle.rxpermissions3.RxPermissions import com.tbruyelle.rxpermissions3.RxPermissions
import com.umeng.umcrash.UMCrash
import com.yidian.bcommon.base.BaseFragment import com.yidian.bcommon.base.BaseFragment
import com.yidian.bcommon.utils.ImageCompressUtils import com.yidian.bcommon.utils.ImageCompressUtils
import com.yidian.framework.mobile.insight.config.IdentityCardType import com.yidian.framework.mobile.insight.config.IdentityCardType
...@@ -256,12 +257,17 @@ class LifeAccountIDCardAuthFragmentV2 : BaseFragment<FragmentLifeAccountIdCardAu ...@@ -256,12 +257,17 @@ class LifeAccountIDCardAuthFragmentV2 : BaseFragment<FragmentLifeAccountIdCardAu
RxPermissions(this).request(Manifest.permission.CAMERA).subscribe { RxPermissions(this).request(Manifest.permission.CAMERA).subscribe {
if (it) { if (it) {
// 调用XInsight进行身份证采集 // 调用XInsight进行身份证采集
try {
XInsight.startIdentityCardOcr( XInsight.startIdentityCardOcr(
this, this,
ScreenOrientation.VERTICAL, ScreenOrientation.VERTICAL,
if (curFace == Constant.ID_CARD_PORTRAIT_FACE) IdentityCardType.PORTRAIT else IdentityCardType.NATIONAL_EMBLEM, if (curFace == Constant.ID_CARD_PORTRAIT_FACE) IdentityCardType.PORTRAIT else IdentityCardType.NATIONAL_EMBLEM,
Constant.REQUEST_CODE_ID_CARD_CAPTURE Constant.REQUEST_CODE_ID_CARD_CAPTURE
) )
} catch (e: Exception) {
e.printStackTrace()
UMCrash.generateCustomLog(e,"AuthenticationException")
}
} else { } else {
ToastUtil.showToast(activity, "请在设置里同意相关权限") ToastUtil.showToast(activity, "请在设置里同意相关权限")
} }
...@@ -369,6 +375,7 @@ class LifeAccountIDCardAuthFragmentV2 : BaseFragment<FragmentLifeAccountIdCardAu ...@@ -369,6 +375,7 @@ class LifeAccountIDCardAuthFragmentV2 : BaseFragment<FragmentLifeAccountIdCardAu
File(cachePath + Constant.FILE_PATH_ID_CARD_NATIONAL_EMBLEM_FACE) File(cachePath + Constant.FILE_PATH_ID_CARD_NATIONAL_EMBLEM_FACE)
} }
} }
try {
XInsight.identityCardVerify( XInsight.identityCardVerify(
if (face == Constant.ID_CARD_PORTRAIT_FACE) IdentityCardType.PORTRAIT else IdentityCardType.NATIONAL_EMBLEM, if (face == Constant.ID_CARD_PORTRAIT_FACE) IdentityCardType.PORTRAIT else IdentityCardType.NATIONAL_EMBLEM,
uploadFile, uploadFile,
...@@ -422,6 +429,10 @@ class LifeAccountIDCardAuthFragmentV2 : BaseFragment<FragmentLifeAccountIdCardAu ...@@ -422,6 +429,10 @@ class LifeAccountIDCardAuthFragmentV2 : BaseFragment<FragmentLifeAccountIdCardAu
} }
} }
}) })
} catch (e: Exception) {
e.printStackTrace()
UMCrash.generateCustomLog(e,"AuthenticationException")
}
} }
} }
......
...@@ -35,7 +35,7 @@ allprojects { ...@@ -35,7 +35,7 @@ allprojects {
ext { ext {
group_id = 'com.yidian.yacmodule.shenghuoquan' group_id = 'com.yidian.yacmodule.shenghuoquan'
artifact_id = '' artifact_id = ''
version_name = '0.0.30-SNAPSHOT' version_name = '0.0.31-SNAPSHOT'
} }
task clean(type: Delete) { task clean(type: Delete) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment