适配新版本sdk,增加IAppletHandler重写函数

master
gaoyunfei 2022-04-15 15:07:59 +08:00
parent ea43ddea34
commit 9937e0725e
2 changed files with 58 additions and 1 deletions

View File

@ -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'
}

View File

@ -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<String, String>[] ret = new Map[1];
Map<String, String> params = new HashMap<String, String>();
params.put("appParameter", appParameter);
handler.post(() -> {
channel.invokeMethod("extensionApi:launchApp", params, new MethodChannel.Result() {
@Override
public void success(Object result) {
ret[0] = (Map<String, String>) 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);
}