升级2.42.13
parent
69f89dd03e
commit
5e939fdc46
|
@ -91,6 +91,6 @@ kapt {
|
|||
}
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation 'com.finogeeks.lib:finapplet:2.42.7'
|
||||
implementation 'com.finogeeks.mop:plugins:2.42.7'
|
||||
implementation 'com.finogeeks.lib:finapplet:2.42.13'
|
||||
implementation 'com.finogeeks.mop:plugins:2.42.13'
|
||||
}
|
|
@ -5,8 +5,8 @@ import android.text.TextUtils;
|
|||
import android.util.Log;
|
||||
|
||||
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.interfaces.FinCallback;
|
||||
import com.finogeeks.lib.applet.sdk.api.request.IFinAppletRequest;
|
||||
import com.finogeeks.lib.applet.sdk.model.StartAppletDecryptRequest;
|
||||
import com.finogeeks.mop.api.BaseApi;
|
||||
|
@ -64,6 +64,12 @@ public class AppletModule extends BaseApi {
|
|||
Map<String, String> params = (Map) param.get("params");
|
||||
String apiServer = (String) param.get("apiServer");
|
||||
Boolean isSingleProcess = (Boolean) param.get("isSingleProcess");
|
||||
IFinAppletRequest.ProcessMode processMode;
|
||||
if (Boolean.TRUE.equals(isSingleProcess)) {
|
||||
processMode = IFinAppletRequest.ProcessMode.SINGLE;
|
||||
} else {
|
||||
processMode = IFinAppletRequest.ProcessMode.MULTI;
|
||||
}
|
||||
// mContext是FlutterActivity,
|
||||
// 在Android 6.0、7.0系统的部分设备中热启动小程序时,如果context参数用mContext,会出现无法启动小程序的问题
|
||||
// 所以这里使用Application Context
|
||||
|
@ -76,7 +82,7 @@ public class AppletModule extends BaseApi {
|
|||
IFinAppletRequest.Companion.fromAppId(apiServer, appId)
|
||||
.setStartParams(startParams)
|
||||
.setSequence(sequence)
|
||||
.setSingleProcess(Boolean.TRUE.equals(isSingleProcess)),
|
||||
.setProcessMode(processMode),
|
||||
null
|
||||
);
|
||||
// FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, apiServer, appId, sequence, startParams,null);
|
||||
|
@ -85,7 +91,7 @@ public class AppletModule extends BaseApi {
|
|||
IFinAppletRequest.Companion.fromAppId(appId)
|
||||
.setStartParams(startParams)
|
||||
.setSequence(sequence)
|
||||
.setSingleProcess(Boolean.TRUE.equals(isSingleProcess)),
|
||||
.setProcessMode(processMode),
|
||||
null
|
||||
);
|
||||
}
|
||||
|
@ -148,8 +154,14 @@ public class AppletModule extends BaseApi {
|
|||
String offlineMiniprogramZipPath = (String) param.get("offlineMiniprogramZipPath");
|
||||
String offlineFrameworkZipPath = (String) param.get("offlineFrameworkZipPath");
|
||||
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);
|
||||
// mContext是FlutterActivity,
|
||||
// 在Android 6.0、7.0系统的部分设备中热启动小程序时,如果context参数用mContext,会出现无法启动小程序的问题
|
||||
// 所以这里使用Application Context
|
||||
|
@ -163,7 +175,7 @@ public class AppletModule extends BaseApi {
|
|||
.setSequence(sequence)
|
||||
.setStartParams(params)
|
||||
.setOfflineParams(offlineFrameworkZipPath, offlineMiniprogramZipPath)
|
||||
.setSingleProcess(Boolean.TRUE.equals(isSingleProcess)),
|
||||
.setProcessMode(processMode),
|
||||
null);
|
||||
// 改成通过request来启动小程序
|
||||
// FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, IFinAppletRequest.Companion.fromAppId("apiServer", "appId")
|
||||
|
@ -174,17 +186,29 @@ public class AppletModule extends BaseApi {
|
|||
private void scanOpenApplet(Map param, ICallback callback) {
|
||||
String info = String.valueOf(param.get("info"));
|
||||
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)
|
||||
.setSingleProcess(Boolean.TRUE.equals(isSingleProcess)), null);
|
||||
.setProcessMode(processMode), null);
|
||||
// FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, new StartAppletDecryptRequest(info),null);
|
||||
callback.onSuccess(new HashMap());
|
||||
}
|
||||
|
||||
private void qrcodeOpenApplet(Map param, ICallback callback){
|
||||
private void qrcodeOpenApplet(Map param, ICallback callback) {
|
||||
String qrcode = String.valueOf(param.get("qrcode"));
|
||||
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)
|
||||
.setSingleProcess(Boolean.TRUE.equals(isSingleProcess)), new FinCallback<String>() {
|
||||
.setProcessMode(processMode), new FinCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
callback.onSuccess(new HashMap());
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#import "Mop_initSDK.h"
|
||||
#import "MOPTools.h"
|
||||
#import "FinAppletExt.h"
|
||||
|
||||
@implementation MOP_initSDK
|
||||
|
||||
|
@ -67,6 +66,7 @@
|
|||
config.h5AjaxHookRequestKey = self.config[@"h5AjaxHookRequestKey"];
|
||||
config.pageCountLimit = [self.config[@"pageCountLimit"] integerValue];
|
||||
config.schemes = self.config[@"schemes"];
|
||||
config.webViewInspectable = [self.config[@"debug"] boolValue];
|
||||
NSInteger languageInteger = [self.config[@"language"] integerValue];
|
||||
if (languageInteger == 1) {
|
||||
config.language = FATPreferredLanguageEnglish;
|
||||
|
@ -260,17 +260,21 @@
|
|||
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];
|
||||
if (logLevelIntValue >= 5) {
|
||||
[[FATClient sharedClient].logManager closeLog];
|
||||
} else {
|
||||
if (debug && logLevelIntValue < 5) {
|
||||
FATLogLevel logLevel = logLevelIntValue;
|
||||
NSString *logDir = self.config[@"logDir"];
|
||||
[[FATClient sharedClient].logManager initLogWithLogDir:logDir logLevel:logLevel consoleLog:YES];
|
||||
} else {
|
||||
[FATClient sharedClient].enableLog = NO;
|
||||
}
|
||||
|
||||
[[FATClient sharedClient] setEnableLog:YES];
|
||||
|
||||
success(@{});
|
||||
|
||||
}
|
||||
|
|
|
@ -2,25 +2,22 @@
|
|||
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
|
||||
#
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'mop'
|
||||
s.version = '0.1.1'
|
||||
s.summary = 'finclip miniprogram flutter sdk'
|
||||
s.description = <<-DESC
|
||||
A finclip miniprogram flutter sdk.
|
||||
DESC
|
||||
s.name = 'mop'
|
||||
s.version = '0.1.1'
|
||||
s.summary = 'finclip miniprogram flutter sdk'
|
||||
s.description = <<-DESC
|
||||
A finclip miniprogram flutter sdk.
|
||||
DESC
|
||||
s.homepage = 'https://www.finclip.com'
|
||||
s.license = { :file => '../LICENSE' }
|
||||
s.author = { 'finogeeks' => 'contact@finogeeks.com' }
|
||||
s.source = { :path => '.' }
|
||||
s.source_files = 'Classes/**/*'
|
||||
s.public_header_files = 'Classes/**/*.h'
|
||||
s.dependency 'Flutter'
|
||||
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.license = { :file => '../LICENSE' }
|
||||
s.author = { 'finogeeks' => 'contact@finogeeks.com' }
|
||||
s.source = { :path => '.' }
|
||||
s.source_files = 'Classes/**/*'
|
||||
s.public_header_files = 'Classes/**/*.h'
|
||||
s.dependency 'Flutter'
|
||||
s.ios.deployment_target = '9.0'
|
||||
|
||||
s.dependency 'FinApplet' , '2.42.7'
|
||||
s.dependency 'FinAppletBLE'
|
||||
s.dependency 'FinApplet' , '2.42.13'
|
||||
s.dependency 'FinAppletExt' , '2.42.13'
|
||||
end
|
||||
|
||||
|
|
|
@ -2,27 +2,22 @@
|
|||
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
|
||||
#
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'mop'
|
||||
s.version = '0.1.1'
|
||||
s.summary = 'finclip miniprogram flutter sdk'
|
||||
s.description = <<-DESC
|
||||
A finclip miniprogram flutter sdk.
|
||||
DESC
|
||||
s.name = 'mop'
|
||||
s.version = '0.1.1'
|
||||
s.summary = 'finclip miniprogram flutter sdk'
|
||||
s.description = <<-DESC
|
||||
A finclip miniprogram flutter sdk.
|
||||
DESC
|
||||
s.homepage = 'https://www.finclip.com'
|
||||
s.license = { :file => '../LICENSE' }
|
||||
s.author = { 'finogeeks' => 'contact@finogeeks.com' }
|
||||
s.source = { :path => '.' }
|
||||
s.source_files = 'Classes/**/*'
|
||||
s.public_header_files = 'Classes/**/*.h'
|
||||
s.dependency 'Flutter'
|
||||
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 'FinAppletExt' , '__finapplet_version__'
|
||||
s.dependency 'FinAppletBLE'
|
||||
s.license = { :file => '../LICENSE' }
|
||||
s.author = { 'finogeeks' => 'contact@finogeeks.com' }
|
||||
s.source = { :path => '.' }
|
||||
s.source_files = 'Classes/**/*'
|
||||
s.public_header_files = 'Classes/**/*.h'
|
||||
s.dependency 'Flutter'
|
||||
s.ios.deployment_target = '9.0'
|
||||
|
||||
s.dependency 'FinApplet' , '__finapplet_version__'
|
||||
s.dependency 'FinAppletExt' , '__finapplet_version__'
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: mop
|
||||
description: A Finogeeks MiniProgram Flutter SDK.
|
||||
version: '2.42.7'
|
||||
version: '2.42.13'
|
||||
homepage: https://github.com/finogeeks/mop-flutter-sdk
|
||||
|
||||
environment:
|
||||
|
|
Loading…
Reference in New Issue