From ffbc1b16d7107e4a953e96132ba7e91589a545c3 Mon Sep 17 00:00:00 2001 From: yangbingqiao Date: Sat, 8 Oct 2022 22:58:20 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=8F=90=E5=8D=87Android=E6=A0=B8?= =?UTF-8?q?=E5=BF=83SDK=E7=89=88=E6=9C=AC=EF=BC=8C=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E9=97=AE=E9=A2=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/build.gradle | 2 +- .../mop/api/mop/AppletManageModule.java | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 0f9e541..deed181 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.38.1' + implementation 'com.finogeeks.lib:finapplet:2.38.2-alpha20221008v03' implementation 'com.finogeeks.mop:plugins:2.38.1' } \ No newline at end of file diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/AppletManageModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/AppletManageModule.java index d25998a..d950b9a 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/AppletManageModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/AppletManageModule.java @@ -10,7 +10,7 @@ import com.finogeeks.lib.applet.anim.SlideFromLeftToRightAnim; import com.finogeeks.lib.applet.anim.SlideFromRightToLeftAnim; import com.finogeeks.lib.applet.anim.SlideFromTopToBottomAnim; import com.finogeeks.lib.applet.client.FinAppClient; -import com.finogeeks.lib.applet.db.entity.FinApplet; +import com.finogeeks.lib.applet.client.FinAppInfo; import com.finogeeks.lib.applet.interfaces.FinCallback; import com.finogeeks.lib.applet.rest.model.WechatLoginInfo; import com.finogeeks.mop.api.BaseApi; @@ -41,19 +41,19 @@ public class AppletManageModule extends BaseApi { if (event.equals("currentApplet")) { String appId = FinAppClient.INSTANCE.getAppletApiManager().getCurrentAppletId(); if (appId != null) { - FinApplet applet = FinAppClient.INSTANCE.getAppletApiManager().getUsedApplet(appId); - if (applet != null) { + FinAppInfo appletInfo = FinAppClient.INSTANCE.getAppletApiManager().getAppletInfoFromRunning(appId); + if (appletInfo != null) { //Log.e(TAG, "applet:" + new Gson().toJson(applet)); Map res = new HashMap<>(); - res.put("appId", applet.getId()); - res.put("name", applet.getName()); - res.put("icon", applet.getIcon()); - res.put("description", applet.getDescription()); - res.put("version", applet.getVersion()); - res.put("thumbnail", applet.getThumbnail()); - res.put("appletType", applet.getAppletType()); - Map wechatLoginInfo = new HashMap<>(3); - WechatLoginInfo wechatLogin = applet.getWechatLoginInfo(); + res.put("appId", appletInfo.getAppId()); + res.put("name", appletInfo.getAppTitle()); + res.put("icon", appletInfo.getAppAvatar()); + res.put("description", appletInfo.getAppDescription()); + res.put("version", appletInfo.getAppVersion()); + res.put("thumbnail", appletInfo.getAppThumbnail()); + res.put("appletType", appletInfo.getAppType()); + Map wechatLoginInfo = new HashMap<>(4); + WechatLoginInfo wechatLogin = appletInfo.getWechatLoginInfo(); if (wechatLogin != null) { wechatLoginInfo.put("wechatOriginId", wechatLogin.getWechatOriginId()); wechatLoginInfo.put("profileUrl", wechatLogin.getProfileUrl());