diff --git a/android/build.gradle b/android/build.gradle index 3298f63..556bcea 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -91,6 +91,6 @@ kapt { } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.finogeeks.lib:finapplet:2.41.1' - implementation 'com.finogeeks.mop:plugins:2.41.1' + implementation 'com.finogeeks.lib:finapplet:2.41.4-dev20230721v13' + implementation 'com.finogeeks.mop:plugins:2.41.3' } \ No newline at end of file diff --git a/android/src/main/java/com/finogeeks/mop/impls/MyUserProfileHandler.java b/android/src/main/java/com/finogeeks/mop/impls/MyUserProfileHandler.java index a5cf050..defe8b3 100644 --- a/android/src/main/java/com/finogeeks/mop/impls/MyUserProfileHandler.java +++ b/android/src/main/java/com/finogeeks/mop/impls/MyUserProfileHandler.java @@ -25,34 +25,35 @@ public class MyUserProfileHandler implements IUserProfileHandler { public void getUserProfileWithAppletInfo(@NotNull Context context, @NotNull FinAppInfo finAppInfo, @NotNull UserProfileCallback callback) { MethodChannel channel = MopPluginService.getInstance().getMethodChannel(); Log.d(TAG, "getUserProfileWithAppletInfo:"); - Log.d(TAG, "channel:" + channel !=null ? "存在": "不存在" ); - channel.invokeMethod("extensionApi:getUserProfile", null, new MethodChannel.Result() { - @Override - public void success(Object mapResult) { - JSONObject result = null; - try { - result = new JSONObject((Map)mapResult); - } catch (Exception e) { - + Log.d(TAG, "channel:" + (channel != null ? "存在" : "不存在")); + new Handler(Looper.getMainLooper()).post(() -> { + channel.invokeMethod("extensionApi:getUserProfile", null, new MethodChannel.Result() { + @Override + public void success(Object mapResult) { + JSONObject result = null; + try { + result = new JSONObject((Map) mapResult); + } catch (Exception e) { + + } + + if (result == null) { + callback.onError(null); + } else { + callback.onSuccess(result); + } } - - if (result == null) { + + @Override + public void error(String errorCode, String errorMessage, Object errorDetails) { callback.onError(null); - } else { - callback.onSuccess(result); } - } - @Override - public void error(String errorCode, String errorMessage, Object errorDetails) { - callback.onError(null); - } - - @Override - public void notImplemented() { - callback.onError(null); - } + @Override + public void notImplemented() { + callback.onError(null); + } + }); }); - } } diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 548b229..c1d619b 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -70,7 +70,7 @@ flutter { } dependencies { - def sdk_version = "2.41.1" - compileOnly "com.finogeeks.lib:finapplet:${sdk_version}" + def sdk_version = "2.41.3" + compileOnly "com.finogeeks.lib:finapplet:2.41.4-dev20230721v13" implementation "com.finogeeks.mop:plugins:${sdk_version}" } diff --git a/example/pubspec.lock b/example/pubspec.lock index 10ef965..ee91b9b 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.flutter-io.cn" source: hosted - version: "2.8.2" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -21,21 +21,14 @@ packages: name: characters url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.3.1" + version: "1.2.1" clock: dependency: transitive description: name: clock url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: @@ -56,7 +49,7 @@ packages: name: fake_async url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.0" + version: "1.3.1" flutter: dependency: "direct main" description: flutter @@ -94,21 +87,21 @@ packages: name: matcher url: "https://pub.flutter-io.cn" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.flutter-io.cn" source: hosted - version: "0.1.4" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.flutter-io.cn" source: hosted - version: "1.7.0" + version: "1.8.0" mop: dependency: "direct main" description: @@ -122,7 +115,7 @@ packages: name: path url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.1" + version: "1.8.2" sky_engine: dependency: transitive description: flutter @@ -134,7 +127,7 @@ packages: name: source_span url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.2" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -155,21 +148,21 @@ packages: name: string_scanner url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.9" + version: "0.4.12" vector_math: dependency: transitive description: diff --git a/pubspec.lock b/pubspec.lock index 7d68fe5..e3f3961 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.flutter-io.cn" source: hosted - version: "2.8.2" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -21,21 +21,14 @@ packages: name: characters url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.3.1" + version: "1.2.1" clock: dependency: transitive description: name: clock url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: @@ -49,7 +42,7 @@ packages: name: fake_async url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.0" + version: "1.3.1" flutter: dependency: "direct main" description: flutter @@ -87,28 +80,28 @@ packages: name: matcher url: "https://pub.flutter-io.cn" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.flutter-io.cn" source: hosted - version: "0.1.4" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.flutter-io.cn" source: hosted - version: "1.7.0" + version: "1.8.0" path: dependency: transitive description: name: path url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.1" + version: "1.8.2" sky_engine: dependency: transitive description: flutter @@ -120,7 +113,7 @@ packages: name: source_span url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.2" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -141,21 +134,21 @@ packages: name: string_scanner url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.9" + version: "0.4.12" vector_math: dependency: transitive description: