From cd998489cb849626a91f88476554c5d196ceeb81 Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Sun, 7 Feb 2021 18:29:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../finogeeks/mop/api/mop/AppletHandlerModule.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/AppletHandlerModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/AppletHandlerModule.java index 154e9bb..7ab62d4 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/AppletHandlerModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/AppletHandlerModule.java @@ -55,14 +55,14 @@ public class AppletHandlerModule extends BaseApi { @Override public void shareAppMessage(@NotNull String s, @Nullable Bitmap bitmap, @NotNull IAppletCallback iAppletCallback) { - Log.d("MopPlugin", "shareAppMessage:" + s+" bitmap:"+bitmap); + Log.d("MopPlugin", "shareAppMessage:" + s + " bitmap:" + bitmap); Map params = new HashMap<>(); params.put("appletInfo", GsonUtil.gson.fromJson(s, new TypeToken>() { }.getType())); ByteArrayOutputStream baos = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos); byte[] data = baos.toByteArray(); - params.put("bitmap",data); + params.put("bitmap", data); handler.post(() -> { channel.invokeMethod("extensionApi:forwardApplet", params, new MethodChannel.Result() { @Override @@ -159,10 +159,11 @@ public class AppletHandlerModule extends BaseApi { } @Override - public void onRegisteredMoreMenuItemClicked(@NotNull String s,String path, int i) { + public void onRegisteredMoreMenuItemClicked(@NotNull String appId, @NotNull String path, @NotNull String menuItemId, @Nullable String appInfo, @Nullable Bitmap bitmap, @NotNull IAppletCallback iAppletCallback) { + Map params = new HashMap<>(); - params.put("appId", s); - params.put("menuId", i); + params.put("appId", appId); + params.put("menuId", menuItemId); handler.post(() -> { channel.invokeMethod("extensionApi:onCustomMenuClick", params); });