升级2.42.13
parent
69f89dd03e
commit
5e939fdc46
|
@ -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'
|
||||||
}
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
// mContext是FlutterActivity,
|
// mContext是FlutterActivity,
|
||||||
// 在Android 6.0、7.0系统的部分设备中热启动小程序时,如果context参数用mContext,会出现无法启动小程序的问题
|
// 在Android 6.0、7.0系统的部分设备中热启动小程序时,如果context参数用mContext,会出现无法启动小程序的问题
|
||||||
// 所以这里使用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);
|
||||||
// mContext是FlutterActivity,
|
// mContext是FlutterActivity,
|
||||||
// 在Android 6.0、7.0系统的部分设备中热启动小程序时,如果context参数用mContext,会出现无法启动小程序的问题
|
// 在Android 6.0、7.0系统的部分设备中热启动小程序时,如果context参数用mContext,会出现无法启动小程序的问题
|
||||||
// 所以这里使用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,17 +186,29 @@ 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());
|
||||||
}
|
}
|
||||||
|
|
||||||
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());
|
||||||
|
|
|
@ -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(@{});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,25 +2,22 @@
|
||||||
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
|
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
|
||||||
#
|
#
|
||||||
Pod::Spec.new do |s|
|
Pod::Spec.new do |s|
|
||||||
s.name = 'mop'
|
s.name = 'mop'
|
||||||
s.version = '0.1.1'
|
s.version = '0.1.1'
|
||||||
s.summary = 'finclip miniprogram flutter sdk'
|
s.summary = 'finclip miniprogram flutter sdk'
|
||||||
s.description = <<-DESC
|
s.description = <<-DESC
|
||||||
A finclip miniprogram flutter sdk.
|
A finclip miniprogram flutter sdk.
|
||||||
DESC
|
DESC
|
||||||
s.homepage = 'https://www.finclip.com'
|
s.homepage = 'https://www.finclip.com'
|
||||||
s.license = { :file => '../LICENSE' }
|
s.license = { :file => '../LICENSE' }
|
||||||
s.author = { 'finogeeks' => 'contact@finogeeks.com' }
|
s.author = { 'finogeeks' => 'contact@finogeeks.com' }
|
||||||
s.source = { :path => '.' }
|
s.source = { :path => '.' }
|
||||||
s.source_files = 'Classes/**/*'
|
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
|
||||||
|
|
||||||
|
|
|
@ -2,27 +2,22 @@
|
||||||
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
|
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
|
||||||
#
|
#
|
||||||
Pod::Spec.new do |s|
|
Pod::Spec.new do |s|
|
||||||
s.name = 'mop'
|
s.name = 'mop'
|
||||||
s.version = '0.1.1'
|
s.version = '0.1.1'
|
||||||
s.summary = 'finclip miniprogram flutter sdk'
|
s.summary = 'finclip miniprogram flutter sdk'
|
||||||
s.description = <<-DESC
|
s.description = <<-DESC
|
||||||
A finclip miniprogram flutter sdk.
|
A finclip miniprogram flutter sdk.
|
||||||
DESC
|
DESC
|
||||||
s.homepage = 'https://www.finclip.com'
|
s.homepage = 'https://www.finclip.com'
|
||||||
s.license = { :file => '../LICENSE' }
|
s.license = { :file => '../LICENSE' }
|
||||||
s.author = { 'finogeeks' => 'contact@finogeeks.com' }
|
s.author = { 'finogeeks' => 'contact@finogeeks.com' }
|
||||||
s.source = { :path => '.' }
|
s.source = { :path => '.' }
|
||||||
s.source_files = 'Classes/**/*'
|
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 'FinAppletExt' , '__finapplet_version__'
|
|
||||||
s.dependency 'FinAppletBLE'
|
|
||||||
|
|
||||||
|
s.dependency 'FinApplet' , '__finapplet_version__'
|
||||||
|
s.dependency 'FinAppletExt' , '__finapplet_version__'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue