Skip to content

Commit

Permalink
Merge pull request #6 from weiruiyang/master
Browse files Browse the repository at this point in the history
android 升级到2.5.0
  • Loading branch information
weiruiyang authored Oct 25, 2019
2 parents 015ac58 + 41fda60 commit dab238d
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 40 deletions.
1 change: 0 additions & 1 deletion example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ <h1>Apache Cordova</h1>
<button onclick="JGJVerificationPlugin.isInitSuccess(function(msg){alert(msg);})">isInitSuccess</button>
<button onclick="JGJVerificationPlugin.checkVerifyEnable(function(msg){alert(msg);})">checkVerifyEnable</button>
<button onclick="JGJVerificationPlugin.getToken(3000,function(msg){alert(msg);})">getToken</button>
<button onclick="JGJVerificationPlugin.verifyNumber('dddddddd','12222222',function(msg){alert(msg);})">verifyNumbe</button>
<button onclick="JGJVerificationPlugin.preLogin(3000,function(msg){alert(msg);})">preLogin</button>
<button onclick="JGJVerificationPlugin.dismissLoginAuth()">dismissLoginAuth</button>
<button onclick="javascript:setCustomUIWithConfig()">setCustomUIWithConfig</button>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jg-jverification-cordova-plugin",
"version": "1.1.2",
"version": "1.1.3",
"description": "JVerification-cordova-plugin",
"cordova": {
"id": "jg-jverification-cordova-plugin",
Expand Down
11 changes: 9 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin xmlns:android="http://schemas.android.com/apk/res/android"
id="jg-jverification-cordova-plugin" version="1.1.2"
id="jg-jverification-cordova-plugin" version="1.1.3"
xmlns="http://apache.org/cordova/ns/plugins/1.0">
<name>JVerification-cordova-plugin</name>

Expand Down Expand Up @@ -121,7 +121,14 @@
</config-file>


<lib-file src="src/android/libs/jverification-android-release-2.3.2.jar" />

<resource-file src="src/android/libs/arm64-v8a/libCtaApiLib.so" target="jniLibs/arm64-v8a/libCtaApiLib.so"/>
<resource-file src="src/android/libs/armeabi/libCtaApiLib.so" target="jniLibs/armeabi/libCtaApiLib.so"/>
<resource-file src="src/android/libs/armeabi-v7a/libCtaApiLib.so" target="jniLibs/armeabi-v7a/libCtaApiLib.so"/>
<resource-file src="src/android/libs/x86/libCtaApiLib.so" target="jniLibs/x86/libCtaApiLib.so"/>
<resource-file src="src/android/libs/x86_64/libCtaApiLib.so" target="jniLibs/x86_64/libCtaApiLib.so"/>

<lib-file src="src/android/libs/jverification-android-release-2.5.0.jar" />
<source-file src="src/android/cn/jiguang/cordova/verification/JVerificationPlugin.java"
target-dir="src/cn/jiguang/cordova/verification/" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,27 +89,6 @@ public void onResult(int code, String content, String operator) {
});
}

void verifyNumber(JSONArray data, CallbackContext callbackContext) throws JSONException {
String token = data.getString(0);
String phone = data.getString(1);
JVerificationInterface.verifyNumber(mContext, token, phone, new VerifyListener() {
@Override
public void onResult(int code, String content, String operator) {
JSONObject jsonObject = new JSONObject();
try {
jsonObject.put("code", code);
jsonObject.put("content", content);
jsonObject.put("operator", operator);
} catch (JSONException e) {
e.printStackTrace();
}

callbackContext.success(jsonObject.toString());

}
});
}

void preLogin(JSONArray data, CallbackContext callbackContext) throws JSONException {
int timeOut = data.getInt(0);
JVerificationInterface.preLogin(mContext, timeOut, new PreLoginListener() {
Expand Down
Binary file added src/android/libs/arm64-v8a/libCtaApiLib.so
Binary file not shown.
Binary file added src/android/libs/armeabi-v7a/libCtaApiLib.so
Binary file not shown.
Binary file added src/android/libs/armeabi/libCtaApiLib.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/android/libs/x86/libCtaApiLib.so
Binary file not shown.
Binary file added src/android/libs/x86_64/libCtaApiLib.so
Binary file not shown.
15 changes: 0 additions & 15 deletions www/JG-JVerification-cordova-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,6 @@ var JMessagePlugin = {
exec(listener, null, PLUGIN_NAME, 'getToken', [timeOut]);
},

/**
* 验证手机号是否是当前在线的sim卡的手机号
* @param {String} token 选填,getToken接口返回的token。如果传空,将自动调用getToken方法再执行手机号验证
* @param {String} phone 必填,需要验证的手机号。如果传空会报4001参数错误
* @param {function} listener = function (String){}
*
* {"code":1000,"content":"ok","operator":"CM"}
* code: 返回码,1000代表验证一致,1001代表验证不一致,其他为失败,详见错误码描述
* content:返回码的解释信息
* operator:成功时为对应运营商,CM代表中国移动,CU代表中国联通,CT代表中国电信。失败时可能为null
*/
verifyNumber: function (token, phone, listener) {
exec(listener, null, PLUGIN_NAME, 'verifyNumber', [token, phone]);
},

/**
* 验证当前运营商网络是否可以进行一键登录操作,该方法会缓存取号信息,提高一键登录效率。建议发起一键登录前先调用此方法。
* @param {int} timeOut 超时时间(毫秒),有效取值范围[3000,10000]
Expand Down

0 comments on commit dab238d

Please sign in to comment.