同步finclip的到2.41.11

master
Stewen 2023-09-15 18:58:49 +08:00
parent 88ba453230
commit 1446c77149
4 changed files with 67 additions and 5 deletions

View File

@ -91,6 +91,6 @@ kapt {
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.finogeeks.lib:finapplet:2.41.5'
implementation 'com.finogeeks.mop:plugins:2.41.5'
implementation 'com.finogeeks.lib:finapplet:2.41.11'
implementation 'com.finogeeks.mop:plugins:2.41.11'
}

View File

@ -26,6 +26,8 @@ import com.finogeeks.mop.utils.AppletUtils;
import com.finogeeks.mop.utils.GsonUtil;
import com.finogeeks.mop.impls.MyUserProfileHandler;
import com.google.gson.reflect.TypeToken;
import com.finogeeks.lib.applet.sdk.api.IAppletLifecycleCallback;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@ -69,6 +71,66 @@ public class AppletHandlerModule extends BaseApi {
// getUserProfile
FinAppClient.INSTANCE.getFinAppConfig().setGetUserProfileHandlerClass(MyUserProfileHandler.class.getName());
FinAppClient.INSTANCE.getAppletApiManager().setAppletLifecycleCallback(new IAppletLifecycleCallback() {
@Override
public void onCreate(@NotNull String appId) {
Log.d(TAG, "IAppletLifecycleCallback onCreate : " + appId);
}
@Override
public void onInitComplete(@NotNull String appId) {
Log.d(TAG, "IAppletLifecycleCallback onInitComplete : " + appId);
Map<String, Object> params = new HashMap<>();
params.put("appId", appId);
handler.post(() -> {
channel.invokeMethod("extensionApi:appletDidOpen", params, new MethodChannel.Result() {
@Override
public void success(Object result) {
}
@Override
public void error(String errorCode, String errorMessage, Object errorDetails) {
}
@Override
public void notImplemented() {
}
});
});
}
@Override
public void onStart(@NotNull String appId) {
Log.d(TAG, "IAppletLifecycleCallback onStart : " + appId);
}
@Override
public void onResume(@NotNull String appId) {
Log.d(TAG, "IAppletLifecycleCallback onResume : " + appId);
}
@Override
public void onPause(@NotNull String appId) {
Log.d(TAG, "IAppletLifecycleCallback onPause : " + appId);
}
@Override
public void onStop(@NotNull String appId) {
Log.d(TAG, "IAppletLifecycleCallback onStop : " + appId);
}
@Override
public void onDestroy(@NotNull String appId) {
Log.d(TAG, "IAppletLifecycleCallback onDestroy : " + appId);
}
@Override
public void onFailure(@NotNull String appId, String errMsg) {
Log.d(TAG, "IAppletLifecycleCallback onFailure : " + appId);
}
});
FinAppClient.INSTANCE.getAppletApiManager().setAppletHandler(mIAppletHandler = new IAppletHandler() {
@Nullable

View File

@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk.
s.dependency 'Flutter'
s.ios.deployment_target = '9.0'
s.dependency 'FinApplet' , '2.41.5'
s.dependency 'FinAppletExt' , '2.41.5'
s.dependency 'FinApplet' , '2.41.11'
s.dependency 'FinAppletExt' , '2.41.11'
end

View File

@ -1,6 +1,6 @@
name: mop
description: A Finogeeks MiniProgram Flutter SDK.
version: '2.41.5'
version: '2.41.11'
homepage: https://github.com/finogeeks/mop-flutter-sdk
environment: