diff --git a/android/build.gradle b/android/build.gradle index f91a062..5edfc73 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.5-fix20220519v01' + implementation 'com.finogeeks.lib:finapplet:2.36.5-fix202220517v01' implementation 'com.finogeeks.mop:plugins:2.36.5' } \ 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 9d3ebad..98219ec 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 @@ -31,7 +31,8 @@ public class AppletManageModule extends BaseApi { @Override public String[] apis() { - return new String[]{"currentApplet", "closeAllApplets", "clearApplets", "removeUsedApplet", "closeApplet", + return new String[]{"currentApplet", "closeAllApplets", "clearApplets", + "removeUsedApplet", "removeAllUsedApplets","closeApplet", "setActivityTransitionAnim", "sendCustomEvent", "callJS", "finishRunningApplet"}; } @@ -97,7 +98,10 @@ public class AppletManageModule extends BaseApi { } else { callback.onFail(null); } - } else if (event.equals("setActivityTransitionAnim")) { + } else if(event.equals("removeAllUsedApplets")){ + Log.e(TAG,"removeAllUsedApplets"); + FinAppClient.INSTANCE.getAppletApiManager().removeAllUsedApplets(); + }else if (event.equals("setActivityTransitionAnim")) { String anim = (String) param.get("anim"); Log.d(TAG, "setActivityTransitionAnim:" + anim); if ("SlideFromLeftToRightAnim".equals(anim)) { diff --git a/lib/mop.dart b/lib/mop.dart index 4cdf16b..d27eaf2 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -407,6 +407,12 @@ class Mop { return await _channel.invokeMethod("removeUsedApplet", params); } + /// 清除所有小程序缓存 + Future removeAllUsedApplets() async { + Map params = {}; + return await _channel.invokeMethod("removeAllUsedApplets", params); + } + /// /// 获取运行时版本号 ///