升级2.42.13

phiz_2.42.13.3
Sean 2023-12-25 14:45:49 +08:00
parent 69f89dd03e
commit 5e939fdc46
6 changed files with 81 additions and 61 deletions

View File

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

View File

@ -5,8 +5,8 @@ import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import com.finogeeks.lib.applet.client.FinAppClient; import com.finogeeks.lib.applet.client.FinAppClient;
import com.finogeeks.lib.applet.interfaces.FinCallback;
import com.finogeeks.lib.applet.client.FinAppInfo; import com.finogeeks.lib.applet.client.FinAppInfo;
import com.finogeeks.lib.applet.interfaces.FinCallback;
import com.finogeeks.lib.applet.sdk.api.request.IFinAppletRequest; import com.finogeeks.lib.applet.sdk.api.request.IFinAppletRequest;
import com.finogeeks.lib.applet.sdk.model.StartAppletDecryptRequest; import com.finogeeks.lib.applet.sdk.model.StartAppletDecryptRequest;
import com.finogeeks.mop.api.BaseApi; import com.finogeeks.mop.api.BaseApi;
@ -64,6 +64,12 @@ public class AppletModule extends BaseApi {
Map<String, String> params = (Map) param.get("params"); Map<String, String> params = (Map) param.get("params");
String apiServer = (String) param.get("apiServer"); String apiServer = (String) param.get("apiServer");
Boolean isSingleProcess = (Boolean) param.get("isSingleProcess"); Boolean isSingleProcess = (Boolean) param.get("isSingleProcess");
IFinAppletRequest.ProcessMode processMode;
if (Boolean.TRUE.equals(isSingleProcess)) {
processMode = IFinAppletRequest.ProcessMode.SINGLE;
} else {
processMode = IFinAppletRequest.ProcessMode.MULTI;
}
// mContextFlutterActivity // mContextFlutterActivity
// Android 6.07.0contextmContext // Android 6.07.0contextmContext
// 使Application Context // 使Application Context
@ -76,7 +82,7 @@ public class AppletModule extends BaseApi {
IFinAppletRequest.Companion.fromAppId(apiServer, appId) IFinAppletRequest.Companion.fromAppId(apiServer, appId)
.setStartParams(startParams) .setStartParams(startParams)
.setSequence(sequence) .setSequence(sequence)
.setSingleProcess(Boolean.TRUE.equals(isSingleProcess)), .setProcessMode(processMode),
null null
); );
// FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, apiServer, appId, sequence, startParams,null); // FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, apiServer, appId, sequence, startParams,null);
@ -85,7 +91,7 @@ public class AppletModule extends BaseApi {
IFinAppletRequest.Companion.fromAppId(appId) IFinAppletRequest.Companion.fromAppId(appId)
.setStartParams(startParams) .setStartParams(startParams)
.setSequence(sequence) .setSequence(sequence)
.setSingleProcess(Boolean.TRUE.equals(isSingleProcess)), .setProcessMode(processMode),
null null
); );
} }
@ -148,8 +154,14 @@ public class AppletModule extends BaseApi {
String offlineMiniprogramZipPath = (String) param.get("offlineMiniprogramZipPath"); String offlineMiniprogramZipPath = (String) param.get("offlineMiniprogramZipPath");
String offlineFrameworkZipPath = (String) param.get("offlineFrameworkZipPath"); String offlineFrameworkZipPath = (String) param.get("offlineFrameworkZipPath");
Boolean isSingleProcess = (Boolean) param.get("isSingleProcess"); Boolean isSingleProcess = (Boolean) param.get("isSingleProcess");
IFinAppletRequest.ProcessMode processMode;
if (Boolean.TRUE.equals(isSingleProcess)) {
processMode = IFinAppletRequest.ProcessMode.SINGLE;
} else {
processMode = IFinAppletRequest.ProcessMode.MULTI;
}
Log.d("MopPlugin", "startApplet (appId=" + appId + ", sequence=" + sequence + " apiServer=" + apiServer + ")"); Log.d("MopPlugin", "startApplet (appId=" + appId + ", sequence=" + sequence + ", apiServer=" + apiServer + ", isSingleProcess:" + isSingleProcess);
// mContextFlutterActivity // mContextFlutterActivity
// Android 6.07.0contextmContext // Android 6.07.0contextmContext
// 使Application Context // 使Application Context
@ -163,7 +175,7 @@ public class AppletModule extends BaseApi {
.setSequence(sequence) .setSequence(sequence)
.setStartParams(params) .setStartParams(params)
.setOfflineParams(offlineFrameworkZipPath, offlineMiniprogramZipPath) .setOfflineParams(offlineFrameworkZipPath, offlineMiniprogramZipPath)
.setSingleProcess(Boolean.TRUE.equals(isSingleProcess)), .setProcessMode(processMode),
null); null);
// request // request
// FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, IFinAppletRequest.Companion.fromAppId("apiServer", "appId") // FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, IFinAppletRequest.Companion.fromAppId("apiServer", "appId")
@ -174,8 +186,14 @@ public class AppletModule extends BaseApi {
private void scanOpenApplet(Map param, ICallback callback) { private void scanOpenApplet(Map param, ICallback callback) {
String info = String.valueOf(param.get("info")); String info = String.valueOf(param.get("info"));
Boolean isSingleProcess = (Boolean) param.get("isSingleProcess"); Boolean isSingleProcess = (Boolean) param.get("isSingleProcess");
IFinAppletRequest.ProcessMode processMode;
if (Boolean.TRUE.equals(isSingleProcess)) {
processMode = IFinAppletRequest.ProcessMode.SINGLE;
} else {
processMode = IFinAppletRequest.ProcessMode.MULTI;
}
FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, IFinAppletRequest.Companion.fromDecrypt(info) FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, IFinAppletRequest.Companion.fromDecrypt(info)
.setSingleProcess(Boolean.TRUE.equals(isSingleProcess)), null); .setProcessMode(processMode), null);
// FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, new StartAppletDecryptRequest(info),null); // FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, new StartAppletDecryptRequest(info),null);
callback.onSuccess(new HashMap()); callback.onSuccess(new HashMap());
} }
@ -183,8 +201,14 @@ public class AppletModule extends BaseApi {
private void qrcodeOpenApplet(Map param, ICallback callback) { private void qrcodeOpenApplet(Map param, ICallback callback) {
String qrcode = String.valueOf(param.get("qrcode")); String qrcode = String.valueOf(param.get("qrcode"));
Boolean isSingleProcess = (Boolean) param.get("isSingleProcess"); Boolean isSingleProcess = (Boolean) param.get("isSingleProcess");
IFinAppletRequest.ProcessMode processMode;
if (Boolean.TRUE.equals(isSingleProcess)) {
processMode = IFinAppletRequest.ProcessMode.SINGLE;
} else {
processMode = IFinAppletRequest.ProcessMode.MULTI;
}
FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, IFinAppletRequest.Companion.fromQrCode(qrcode) FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, IFinAppletRequest.Companion.fromQrCode(qrcode)
.setSingleProcess(Boolean.TRUE.equals(isSingleProcess)), new FinCallback<String>() { .setProcessMode(processMode), new FinCallback<String>() {
@Override @Override
public void onSuccess(String s) { public void onSuccess(String s) {
callback.onSuccess(new HashMap()); callback.onSuccess(new HashMap());

View File

@ -7,7 +7,6 @@
#import "Mop_initSDK.h" #import "Mop_initSDK.h"
#import "MOPTools.h" #import "MOPTools.h"
#import "FinAppletExt.h"
@implementation MOP_initSDK @implementation MOP_initSDK
@ -67,6 +66,7 @@
config.h5AjaxHookRequestKey = self.config[@"h5AjaxHookRequestKey"]; config.h5AjaxHookRequestKey = self.config[@"h5AjaxHookRequestKey"];
config.pageCountLimit = [self.config[@"pageCountLimit"] integerValue]; config.pageCountLimit = [self.config[@"pageCountLimit"] integerValue];
config.schemes = self.config[@"schemes"]; config.schemes = self.config[@"schemes"];
config.webViewInspectable = [self.config[@"debug"] boolValue];
NSInteger languageInteger = [self.config[@"language"] integerValue]; NSInteger languageInteger = [self.config[@"language"] integerValue];
if (languageInteger == 1) { if (languageInteger == 1) {
config.language = FATPreferredLanguageEnglish; config.language = FATPreferredLanguageEnglish;
@ -260,17 +260,21 @@
return; return;
} }
int logMaxAliveSec = [self.config[@"logMaxAliveSec"] intValue];
if (logMaxAliveSec) {
[[FATClient sharedClient].logManager setLogFileAliveDuration:logMaxAliveSec];
}
BOOL debug = [self.config[@"debug"] boolValue];
NSInteger logLevelIntValue = [self.config[@"logLevel"] integerValue]; NSInteger logLevelIntValue = [self.config[@"logLevel"] integerValue];
if (logLevelIntValue >= 5) { if (debug && logLevelIntValue < 5) {
[[FATClient sharedClient].logManager closeLog];
} else {
FATLogLevel logLevel = logLevelIntValue; FATLogLevel logLevel = logLevelIntValue;
NSString *logDir = self.config[@"logDir"]; NSString *logDir = self.config[@"logDir"];
[[FATClient sharedClient].logManager initLogWithLogDir:logDir logLevel:logLevel consoleLog:YES]; [[FATClient sharedClient].logManager initLogWithLogDir:logDir logLevel:logLevel consoleLog:YES];
} else {
[FATClient sharedClient].enableLog = NO;
} }
[[FATClient sharedClient] setEnableLog:YES];
success(@{}); success(@{});
} }

View File

@ -16,11 +16,8 @@ s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h' s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter' s.dependency 'Flutter'
s.ios.deployment_target = '9.0' s.ios.deployment_target = '9.0'
s.resources = ['Classes/FinAppletExt/Resource/FinAppletExt.bundle']
s.vendored_libraries = 'Classes/FinAppletExt/Vendor/fincore/libfincore.a'
s.vendored_libraries = 'Classes/FinAppletExt/Vendor/Lame/libmp3lame.a'
s.static_framework = true
s.dependency 'FinApplet' , '2.42.7' s.dependency 'FinApplet' , '2.42.13'
s.dependency 'FinAppletBLE' s.dependency 'FinAppletExt' , '2.42.13'
end end

View File

@ -16,13 +16,8 @@ s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h' s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter' s.dependency 'Flutter'
s.ios.deployment_target = '9.0' s.ios.deployment_target = '9.0'
s.resources = ['Classes/FinAppletExt/Resource/FinAppletExt.bundle']
s.vendored_libraries = 'Classes/FinAppletExt/Vendor/fincore/libfincore.a'
s.vendored_libraries = 'Classes/FinAppletExt/Vendor/Lame/libmp3lame.a'
s.static_framework = true
s.dependency 'FinApplet' , '__finapplet_version__' s.dependency 'FinApplet' , '__finapplet_version__'
# s.dependency 'FinAppletExt' , '__finapplet_version__' s.dependency 'FinAppletExt' , '__finapplet_version__'
s.dependency 'FinAppletBLE'
end end

View File

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