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 dd4ba73..575de50 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 @@ -67,8 +67,8 @@ public class BaseModule extends BaseApi { userId = (String) param.get("userId"); } - Boolean needEncrypt = (Boolean) param.get("needEncrypt"); - if (needEncrypt == null) needEncrypt = false; + Boolean encryptServerData = (Boolean) param.get("encryptServerData"); + if (encryptServerData == null) encryptServerData = false; Boolean debug = (Boolean) param.get("debug"); if (debug == null) debug = false; @@ -78,6 +78,7 @@ public class BaseModule extends BaseApi { .setApiUrl(apiServer) .setApiPrefix(apiPrefix) .setEncryptionType(cryptType) + .setEncryptServerData(encryptServerData) .setUserId(userId) .setDebugMode(debug) .setDisableRequestPermissions(disablePermission) diff --git a/lib/mop.dart b/lib/mop.dart index 39d9fa6..7590e2d 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -75,7 +75,7 @@ class Mop { String cryptType, bool disablePermission, String userId, - bool needEncrypt = false, + bool encryptServerData = false, bool debug = false}) async { final Map ret = await _channel.invokeMethod('initialize', { 'appkey': appkey, @@ -85,7 +85,7 @@ class Mop { 'cryptType': cryptType, 'disablePermission': disablePermission, 'userId': userId, - "needEncrypt": needEncrypt, + "encryptServerData": encryptServerData, "debug": debug }); return ret;