From 9937e0725ef2d00252f2226043544bf58dd3fefe Mon Sep 17 00:00:00 2001 From: gaoyunfei Date: Fri, 15 Apr 2022 15:07:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=E6=96=B0=E7=89=88=E6=9C=ACsd?= =?UTF-8?q?k=EF=BC=8C=E5=A2=9E=E5=8A=A0IAppletHandler=E9=87=8D=E5=86=99?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/build.gradle | 2 +- .../mop/api/mop/AppletHandlerModule.java | 57 +++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 8014956..97ffe5e 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.36.1' + implementation 'com.finogeeks.lib:finapplet:2.37.0-alpha20220415v03' implementation 'com.finogeeks.mop:plugins:2.36.1' } \ No newline at end of file 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 168373e..23b64a5 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 @@ -205,6 +205,63 @@ public class AppletHandlerModule extends BaseApi { public void onNavigationBarCloseButtonClicked(@NotNull String s) { } + + @Override + public boolean launchApp(@Nullable String appParameter) { + /*Log.d("AppletHandlerModule", "getUserInfo"); + CountDownLatch latch = new CountDownLatch(1); + final Map[] ret = new Map[1]; + Map params = new HashMap(); + params.put("appParameter", appParameter); + handler.post(() -> { + channel.invokeMethod("extensionApi:launchApp", params, new MethodChannel.Result() { + @Override + public void success(Object result) { + ret[0] = (Map) result; + latch.countDown(); + } + + @Override + public void error(String errorCode, String errorMessage, Object errorDetails) { + latch.countDown(); + } + + @Override + public void notImplemented() { + latch.countDown(); + } + }); + }); + try { + latch.await(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + if (ret[0].size() > 0) + return ret[0]; + else + return null;*/ + return false; + } + + @Override + public void getPhoneNumber(@NotNull IAppletCallback callback) { + } + + @Override + public void chooseAvatar(@NotNull IAppletCallback callback) { + } + + @Override + public boolean contact(@NotNull JSONObject json) { + return false; + } + + @Override + public boolean feedback(@NotNull Bundle bundle) { + return false; + } + }); callback.onSuccess(null); }