实名认证SDK升级
This commit is contained in:
BIN
app/aliyun-libs/MiddleTierSDK-external-release-5.5.13874142.aar
Normal file
BIN
app/aliyun-libs/MiddleTierSDK-external-release-5.5.13874142.aar
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/aliyun-libs/SecurityBodySDK-external-release-5.5.19.aar
Normal file
BIN
app/aliyun-libs/SecurityBodySDK-external-release-5.5.19.aar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/aliyun-libs/rpsdk-4.5.0-open.aar
Normal file
BIN
app/aliyun-libs/rpsdk-4.5.0-open.aar
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/aliyun-libs/windvane.aar
Normal file
BIN
app/aliyun-libs/windvane.aar
Normal file
Binary file not shown.
@@ -173,7 +173,7 @@ android {
|
||||
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
signingConfig signingConfigs.v2
|
||||
signingConfig signingConfigs.v1
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
@@ -251,12 +251,15 @@ dependencies {
|
||||
implementation 'com.meizu.flyme.internet:push-internal:3.9.0@aar'
|
||||
// vivo推送
|
||||
implementation files("libs/vivo_pushsdk-v2.9.0.0.aar")
|
||||
|
||||
//阿里云实名认证
|
||||
api files('aliyun-libs/windvane-min-8.0.3.2.3.jar')
|
||||
api(name: 'windvane', ext: 'aar')
|
||||
api(name: 'oss-android-sdk-2.9.2', ext: 'aar')
|
||||
api(name: 'rpsdk-4.0.4', ext: 'aar')
|
||||
api(name: 'SecurityGuardSDK-external-release-5.4.193-preInstall', ext: 'aar')
|
||||
api(name: 'SecurityBodySDK-external-release-5.4.112-preInstall', ext: 'aar')
|
||||
api(name: 'rpsdk-4.5.0-open', ext: 'aar')
|
||||
api(name: 'MiddleTierSDK-external-release-5.5.13874142', ext: 'aar')
|
||||
api(name: 'SecurityBodySDK-external-release-5.5.19', ext: 'aar')
|
||||
api(name: 'SecurityGuardSDK-external-release-5.5.14240408', ext: 'aar')
|
||||
|
||||
//数字滚动效果
|
||||
implementation 'com.github.YvesCheung:RollingText:1.2.3'
|
||||
// 引入原有第三方裁图源码,方便修改
|
||||
|
@@ -604,6 +604,11 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
|
||||
if (drawerLayout.isDrawerOpen(GravityCompat.START)) {
|
||||
drawerLayout.closeDrawer(GravityCompat.START);
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* 防止华为机型未加入白名单时按返回键回到桌面再锁屏后几秒钟进程被杀
|
||||
*/
|
||||
@@ -626,11 +631,6 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
|
||||
if (drawerLayout.isDrawerOpen(GravityCompat.START)) {
|
||||
drawerLayout.closeDrawer(GravityCompat.START);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
moveTaskToBack(false);
|
||||
} catch (Exception e) {
|
||||
|
@@ -12,12 +12,14 @@ import android.net.http.HttpResponseCache;
|
||||
import android.os.Build;
|
||||
import android.os.Environment;
|
||||
import android.os.StrictMode;
|
||||
import android.taobao.windvane.base.ILogService;
|
||||
import android.text.TextUtils;
|
||||
import android.util.ArrayMap;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.multidex.MultiDex;
|
||||
|
||||
import com.alibaba.security.realidentity.RPVerify;
|
||||
import com.alibaba.security.rp.RPSDK;
|
||||
import com.baidu.mobstat.StatService;
|
||||
import com.bumptech.glide.request.target.ViewTarget;
|
||||
@@ -703,7 +705,7 @@ public class XChatApplication extends Application {
|
||||
EnvUtils.setEnv(EnvUtils.EnvEnum.SANDBOX);
|
||||
}
|
||||
*/
|
||||
RPSDK.initialize(getApplicationContext());
|
||||
RPVerify.init(getApplicationContext());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -14,6 +14,9 @@ import android.webkit.WebView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.security.realidentity.RPEventListener;
|
||||
import com.alibaba.security.realidentity.RPResult;
|
||||
import com.alibaba.security.realidentity.RPVerify;
|
||||
import com.alibaba.security.rp.RPSDK;
|
||||
import com.netease.nim.uikit.common.util.log.LogUtil;
|
||||
import com.orhanobut.logger.Logger;
|
||||
@@ -113,7 +116,7 @@ public class JSInterface {
|
||||
@JavascriptInterface
|
||||
public void openChargePage() {
|
||||
if (context != null) {
|
||||
ChargeActivity.start(context,true);
|
||||
ChargeActivity.start(context, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -435,33 +438,35 @@ public class JSInterface {
|
||||
@JavascriptInterface
|
||||
public void openFaceLiveness(String verifyToken) {
|
||||
Log.d(TAG, "openFaceLiveness() called with: verifyToken = [" + verifyToken + "]");
|
||||
RPSDK.start(verifyToken, mActivity,
|
||||
(audit, s) -> {
|
||||
Log.d(TAG, String.format(Locale.getDefault(), "openFaceLiveness: auit: %s, s: %s",
|
||||
audit, s));
|
||||
int result = -3;
|
||||
if (audit == RPSDK.AUDIT.AUDIT_PASS) {
|
||||
// 认证通过
|
||||
result = 2;
|
||||
// 更新本地缓存
|
||||
UserInfo userInfo = UserModel.get().getCacheLoginUserInfo();
|
||||
if (userInfo != null) {
|
||||
userInfo.setCertified(true);
|
||||
}
|
||||
// 认证通过的时候刷新用户信息
|
||||
UserModel.get().updateCurrentUserInfo().subscribe();
|
||||
} else if (audit == RPSDK.AUDIT.AUDIT_FAIL) {
|
||||
// 认证不通过
|
||||
result = 1;
|
||||
} else if (audit == RPSDK.AUDIT.AUDIT_NOT) {
|
||||
// 未认证,用户取消
|
||||
result = -1;
|
||||
} else if (audit == RPSDK.AUDIT.AUDIT_EXCEPTION) {
|
||||
// 系统异常
|
||||
result = -2;
|
||||
RPVerify.start(mActivity, verifyToken, new RPEventListener() {
|
||||
@Override
|
||||
public void onFinish(RPResult rpResult, String s, String s1) {
|
||||
Log.d(TAG, String.format(Locale.getDefault(), "openFaceLiveness: auit: %s, s: %s",
|
||||
rpResult, s));
|
||||
int result = -3;
|
||||
if (rpResult == RPResult.AUDIT_PASS) {
|
||||
// 认证通过
|
||||
result = 2;
|
||||
// 更新本地缓存
|
||||
UserInfo userInfo = UserModel.get().getCacheLoginUserInfo();
|
||||
if (userInfo != null) {
|
||||
userInfo.setCertified(true);
|
||||
}
|
||||
EventBus.getDefault().post(new CertificationResultEvent().setStatus(result));
|
||||
});
|
||||
// 认证通过的时候刷新用户信息
|
||||
UserModel.get().updateCurrentUserInfo().subscribe();
|
||||
} else if (rpResult == RPResult.AUDIT_FAIL) {
|
||||
// 认证不通过
|
||||
result = 1;
|
||||
} else if (rpResult == RPResult.AUDIT_NOT) {
|
||||
// 未认证,用户取消
|
||||
result = -1;
|
||||
} else if (rpResult == RPResult.AUDIT_EXCEPTION) {
|
||||
// 系统异常
|
||||
result = -2;
|
||||
}
|
||||
EventBus.getDefault().post(new CertificationResultEvent().setStatus(result));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Reference in New Issue
Block a user