diff --git a/android/.settings/org.eclipse.buildship.core.prefs b/android/.settings/org.eclipse.buildship.core.prefs index 41f5edb..c7199bd 100644 --- a/android/.settings/org.eclipse.buildship.core.prefs +++ b/android/.settings/org.eclipse.buildship.core.prefs @@ -2,7 +2,7 @@ arguments=--init-script /var/folders/tv/dbm7kt650fvdxrtf0k7xgxcm0000gn/T/d146c97 auto.sync=false build.scans.enabled=false connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(7.4.2)) -connection.project.dir= +connection.project.dir=../../finosprite/android eclipse.preferences.version=1 gradle.user.home= java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_261.jdk/Contents/Home 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 295866a..a5cf050 100644 --- a/android/src/main/java/com/finogeeks/mop/impls/MyUserProfileHandler.java +++ b/android/src/main/java/com/finogeeks/mop/impls/MyUserProfileHandler.java @@ -25,12 +25,13 @@ 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(mapResult); + result = new JSONObject((Map)mapResult); } catch (Exception e) { } diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 9a095ec..548b229 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -70,7 +70,7 @@ flutter { } dependencies { - def sdk_version = "2.40.1" + def sdk_version = "2.41.1" compileOnly "com.finogeeks.lib:finapplet:${sdk_version}" implementation "com.finogeeks.mop:plugins:${sdk_version}" } diff --git a/example/lib/main.dart b/example/lib/main.dart index 411b093..a0f6fb1 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -98,7 +98,7 @@ class _MyAppState extends State { } }; - return result; + return Future.value(result); } Widget _buildAppletItem( @@ -248,7 +248,18 @@ class MyAppletHandler extends AppletHandler { @override Future> getUserInfo() { // TODO: implement getUserInfo - throw UnimplementedError(); + Map result = { + "userInfo":{ + "nickName" : "haley", + "avatarUrl" : "https://www.finclip.com", + "gender" : 1, + "country" : "China", + "province" : "Guangdong", + "city" : "shenzhen", + } + }; + + return Future.value(result); } @override diff --git a/lib/mop.dart b/lib/mop.dart index e2a769a..a12636e 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -411,7 +411,6 @@ class UIConfig { "disableSlideCloseAppletGesture": disableSlideCloseAppletGesture, "appletText": appletText, "loadingLayoutCls": loadingLayoutCls, - "useNativeLiveComponent": useNativeLiveComponent, }; } }