From 7314fad151477756aca64ac6b954379b5cff9dc4 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Wed, 25 Aug 2021 22:03:04 +0800 Subject: [PATCH] Add bindAppletWithMainProcess config --- .../src/main/java/com/finogeeks/mop/api/mop/BaseModule.java | 3 +++ lib/mop.dart | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java index 575de50..f892b22 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java @@ -71,6 +71,8 @@ public class BaseModule extends BaseApi { if (encryptServerData == null) encryptServerData = false; Boolean debug = (Boolean) param.get("debug"); if (debug == null) debug = false; + Boolean bindAppletWithMainProcess = (Boolean) param.get("bindAppletWithMainProcess"); + if (bindAppletWithMainProcess == null) bindAppletWithMainProcess = false; FinAppConfig config = new FinAppConfig.Builder() .setSdkKey(appkey) @@ -82,6 +84,7 @@ public class BaseModule extends BaseApi { .setUserId(userId) .setDebugMode(debug) .setDisableRequestPermissions(disablePermission) + .setBindAppletWithMainProcess(bindAppletWithMainProcess) .build(); final Application application = MopPluginService.getInstance().getActivity().getApplication(); diff --git a/lib/mop.dart b/lib/mop.dart index 7590e2d..e422084 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -76,7 +76,8 @@ class Mop { bool disablePermission, String userId, bool encryptServerData = false, - bool debug = false}) async { + bool debug = false, + bool bindAppletWithMainProcess = false}) async { final Map ret = await _channel.invokeMethod('initialize', { 'appkey': appkey, 'secret': secret, @@ -86,7 +87,8 @@ class Mop { 'disablePermission': disablePermission, 'userId': userId, "encryptServerData": encryptServerData, - "debug": debug + "debug": debug, + "bindAppletWithMainProcess": bindAppletWithMainProcess }); return ret; }