From fea6a1e22d50b1be4f79304dd228c881da984d40 Mon Sep 17 00:00:00 2001 From: chensiming Date: Mon, 11 Nov 2019 13:42:41 +0800 Subject: [PATCH] update 1.0.3 --- CHANGELOG.md | 4 + README.md | 4 +- .../FlutterGeetestPlugin.java | 16 +++- .../.idea/caches/build_file_checksums.ser | Bin 635 -> 635 bytes .../android/.idea/caches/gradle_models.ser | Bin 180818 -> 180523 bytes example/android/.idea/markdown-navigator.xml | 86 ------------------ example/android/.idea/misc.xml | 83 +++++++++++++++++ example/lib/main.dart | 4 +- lib/flutter_geetest_plugin.dart | 1 + pubspec.yaml | 2 +- 10 files changed, 106 insertions(+), 94 deletions(-) delete mode 100644 example/android/.idea/markdown-navigator.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index 5965ead..edb50e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.3 + +* fix android result + ## 1.0.1 * Stable version diff --git a/README.md b/README.md index ce13cad..f2cc02a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![pub package](https://img.shields.io/badge/pub-1.0.2-brightgreen.svg)](https://pub.dartlang.org/packages/geetest_plugin) [![Build Status](https://travis-ci.com/cikichen/flutter_geetest_plugin.svg?branch=master)](https://travis-ci.com/cikichen/flutter_geetest_plugin) +[![pub package](https://img.shields.io/badge/pub-1.0.3-brightgreen.svg)](https://pub.dartlang.org/packages/geetest_plugin) [![Build Status](https://travis-ci.com/cikichen/flutter_geetest_plugin.svg?branch=master)](https://travis-ci.com/cikichen/flutter_geetest_plugin) # flutter_geetest_plugin @@ -20,7 +20,7 @@ Add this to your package's pubspec.yaml file: ``` dependencies: - flutter_geetest_plugin: ^1.0.2 + flutter_geetest_plugin: ^1.0.3 ``` ### 2. Install it diff --git a/android/src/main/java/me/ithome/flutter_geetest_plugin/FlutterGeetestPlugin.java b/android/src/main/java/me/ithome/flutter_geetest_plugin/FlutterGeetestPlugin.java index fd9ff58..2fd8ab6 100644 --- a/android/src/main/java/me/ithome/flutter_geetest_plugin/FlutterGeetestPlugin.java +++ b/android/src/main/java/me/ithome/flutter_geetest_plugin/FlutterGeetestPlugin.java @@ -1,5 +1,8 @@ package me.ithome.flutter_geetest_plugin; +import android.annotation.SuppressLint; +import android.app.Activity; +import android.content.Context; import android.os.AsyncTask; import android.text.TextUtils; import android.util.Log; @@ -10,6 +13,7 @@ import com.geetest.sdk.GT3Listener; import com.tencent.smtt.sdk.QbSdk; +import org.jetbrains.annotations.NotNull; import org.json.JSONObject; import io.flutter.plugin.common.MethodCall; @@ -25,11 +29,12 @@ public class FlutterGeetestPlugin implements MethodCallHandler { private static String validateURL = "https://www.geetest.com/demo/gt/validate-slide"; private GT3GeetestUtils gt3GeetestUtils; private GT3ConfigBean gt3ConfigBean; - private final Registrar mRegistrar; + // private final Registrar mRegistrar; private static final String TAG = "flutter_geetest"; + private Result flutterResult; private FlutterGeetestPlugin(Registrar registrar) { - this.mRegistrar = registrar; + // this.mRegistrar = registrar; QbSdk.PreInitCallback cb = new QbSdk.PreInitCallback() { @@ -89,6 +94,7 @@ public void onDialogReady(String duration) { @Override public void onDialogResult(String result) { Log.e(TAG, "GT3BaseListener-->onDialogResult-->" + result); + flutterResult.success(result); // 开启api2逻辑 new RequestAPI2().execute(result); } @@ -133,12 +139,13 @@ public static void registerWith(Registrar registrar) { } @Override - public void onMethodCall(MethodCall call, final Result result) { + public void onMethodCall(MethodCall call, @NotNull final Result result) { switch (call.method) { case "getPlatformVersion": result.success("Android " + android.os.Build.VERSION.RELEASE); break; case "getGeetest": + flutterResult = result; captchaURL = call.argument("api1"); validateURL = call.argument("api2"); // 开启验证 @@ -187,6 +194,7 @@ public void onMethodCall(MethodCall call, final Result result) { } /** 请求api1 */ + @SuppressLint("StaticFieldLeak") class RequestAPI1 extends AsyncTask { @Override @@ -215,6 +223,7 @@ protected void onPostExecute(JSONObject parmas) { } /** 请求api2 */ + @SuppressLint("StaticFieldLeak") class RequestAPI2 extends AsyncTask { @Override @@ -233,6 +242,7 @@ protected void onPostExecute(String result) { try { JSONObject jsonObject = new JSONObject(result); String status = jsonObject.getString("status"); + if ("success".equals(status)) { gt3GeetestUtils.showSuccessDialog(); } else { diff --git a/example/android/.idea/caches/build_file_checksums.ser b/example/android/.idea/caches/build_file_checksums.ser index ad2d3c5b0ac7095514cc26288dd5bdb7c15e8084..7d3415bd3d8e8124f83b96f21be376cef626d385 100644 GIT binary patch delta 15 Xcmey(@|$JC43>xx^{S0??lS@aHr@uM delta 15 Xcmey(@|$JC3>McmlY1NI+-C#;Ipzm7 diff --git a/example/android/.idea/caches/gradle_models.ser b/example/android/.idea/caches/gradle_models.ser index ac2bfa6dae5199240cfabae39d25980b9a604c74..e585b33383b1762837f2ce1faf73172427989cc0 100644 GIT binary patch delta 8023 zcmc&(c~n$K*5}siMd)r8Sp-D^Q8X$lHi9fd6Bk@CqPWJDaYa!;F<@{3H;fzLQ%j?$ z3>srxqCxX;*HOpOalyny9Zl3|Mx9^)H8B}nrf$8qtA~&8oH^$^-x>b+z4w0i*1f-1 zRj<10^3@{4t_6mDuNyddtzSIY0snx;WkB09vtx0BrtJ39E_C7x@GE;Zc)D4e;V@5{ zR+jUT8-W?C|KufCE!!l=t~i7|>GH+Ok?v4lHfrl^t+ssKcE=&~YF831`|oH^NBI#$ zS>h*^8fNdhYp1KWJoB$6M>%d+v}`%niKZqJgPizDgR<14V`9NlcCmIL0gIgYni`g3 z%6x?7biWIPuiXmm<)Lrfbt{l7kkj9!2CSXQ?j1C!J&R*D+KLb;!Uh`90>b2zYdYv> zpsOUyd8HUB0xWC)2E|Z9-P%GJEhG>^?*Kf9?KI9nK2Z8duuRfg;_rN0vG#k2l=l^P zq}}w;0ghmUE_7@l38i=RPz5JwhD5^X*cQY>Su1`QqU?5rKnX0g!U$X8nv!9H(EvB( z&%$6%^BYA)IbceR^M83Cu3cc+PKS7Or>UJ2j#3<38 z@S)^rS#Uo*kq=c!6bYBN?hT=>e83Dkx#mciyk&1E`SV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e!etX!$7e`^`2hM)jI2nsPNhSZu1yihOU#V;ju*vcPvg&?c z%5DWM)r*Tr26PE!mFDgUVF;ZOx*$X#L?T2X^hD@|XE2(WO$zK> z0?IR=M7V@-1L29MWW-Q|=-HP`U ze)X~9Nz2+6i-icK2)H#`F&I`1i?|M1@faqqKH_#{O+q`=>bN5PkFzKoTk|PXjK3Bm zh|A3cEILgiHLirj;{S~1EhhnvajF}alUV8h(U9W)S3_dPPAkJyrS2&ubAXJ{5B5Z^ zpb78dGU)fqPs^Lk2`&ihE}HNgjHkDYi5tE2F6r!85MDfM%g^vGC`MZqfxDiJ+8x7J z1x`kBgtsdE2p^80Qum8=%RNX9VL#2dBRkd{&PB5{2LOMV&f}{zouf}ylDFvUG7{p6 a<*yO&eVe|e2g^tg2vKjBk+^Ooq~KrOevKpm diff --git a/example/android/.idea/markdown-navigator.xml b/example/android/.idea/markdown-navigator.xml deleted file mode 100644 index 4194dd2..0000000 --- a/example/android/.idea/markdown-navigator.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/example/android/.idea/misc.xml b/example/android/.idea/misc.xml index 17a1c3a..0934a29 100644 --- a/example/android/.idea/misc.xml +++ b/example/android/.idea/misc.xml @@ -6,6 +6,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/lib/main.dart b/example/lib/main.dart index e57f2c1..91e9dd2 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -45,7 +45,7 @@ class _MyAppState extends State { // Platform messages may fail, so we use a try/catch PlatformException. try { result = await FlutterGeetestPlugin.getGeetest('https://www.geetest.com/demo/gt/register-slide', 'https://www.geetest.com/demo/gt/validate-slide'); - } on PlatformException { + } on Exception { // platformVersion = 'Failed to get platform version.'; } @@ -69,7 +69,7 @@ class _MyAppState extends State { body: new Center( child: Column( children: [ - new Text('Running on: $_platformVersion\n'), + new Text('$_platformVersion\n'), RaisedButton( onPressed: getGeetest, child: Text("geetest"), diff --git a/lib/flutter_geetest_plugin.dart b/lib/flutter_geetest_plugin.dart index 3a723d1..844f0a6 100644 --- a/lib/flutter_geetest_plugin.dart +++ b/lib/flutter_geetest_plugin.dart @@ -11,6 +11,7 @@ class FlutterGeetestPlugin { return version; } + ///一键验证 static Future getGeetest(String api1, String api2) async { final Map params = { 'api1': api1, diff --git a/pubspec.yaml b/pubspec.yaml index bbeb7aa..447bfd7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_geetest_plugin description: Geetest(GT3Captcha) Flutter plugin(极验 - a user-friendly CAPTCHA powered by AI. Protect your website and mobile apps against bot traffic. Start your free trial now!). -version: 1.0.2 +version: 1.0.3 author: SimonChen homepage: https://github.com/cikichen/flutter_geetest_plugin