【RT-27111】基础库预下载
parent
51b2f827f0
commit
347c40f940
|
@ -91,6 +91,6 @@ kapt {
|
|||
}
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation 'com.finogeeks.lib:finapplet:2.40.11'
|
||||
implementation 'com.finogeeks.lib:finapplet:2.40.12-dev20230614v05'
|
||||
implementation 'com.finogeeks.mop:plugins:2.40.11'
|
||||
}
|
|
@ -2,6 +2,7 @@ package com.finogeeks.mop.api.mop;
|
|||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.finogeeks.lib.applet.client.FinAppClient;
|
||||
|
@ -101,8 +102,14 @@ public class BaseModule extends BaseApi {
|
|||
if (fingerprint == null) fingerprint = "";
|
||||
String encryptType = (String) config.get("cryptType");
|
||||
Boolean encryptServerData1 = (Boolean) config.get("encryptServerData");
|
||||
Boolean enablePreloadFramework = (Boolean) config.get("enablePreloadFramework");
|
||||
//凡泰助手里,服务器是https://api.finclip.com,默认开启预加载基础库
|
||||
if(!TextUtils.isEmpty(apiServer) && apiServer.equals("https://api.finclip.com")) {
|
||||
enablePreloadFramework = true;
|
||||
}
|
||||
|
||||
if (encryptServerData1 == null) encryptServerData1 = false;
|
||||
finStoreConfigs.add(new FinStoreConfig(sdkKey, sdkSecret, apiUrl, apmUrl, "", fingerprint, encryptType, encryptServerData1));
|
||||
finStoreConfigs.add(new FinStoreConfig(sdkKey, sdkSecret, apiUrl, apmUrl, "", fingerprint, encryptType, encryptServerData1, enablePreloadFramework));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -155,6 +162,7 @@ public class BaseModule extends BaseApi {
|
|||
|
||||
}
|
||||
};
|
||||
FinAppClient.INSTANCE.preloadFramework(config, application);
|
||||
FinAppClient.INSTANCE.init(application, config, cb);
|
||||
}
|
||||
}
|
|
@ -2,6 +2,7 @@ package com.finogeeks.mop.api.mop;
|
|||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.finogeeks.lib.applet.client.FinAppClient;
|
||||
|
@ -63,8 +64,15 @@ public class InitSDKModule extends BaseApi {
|
|||
}
|
||||
String cryptType = (String) store.get("cryptType");
|
||||
Boolean encryptServerData = (Boolean) store.get("encryptServerData");
|
||||
Boolean enablePreloadFramework = (Boolean) store.get("enablePreloadFramework");
|
||||
//凡泰助手里,服务器是https://api.finclip.com,默认开启预加载基础库
|
||||
if (!TextUtils.isEmpty(apiServer) && apiServer.equals("https://api.finclip.com")) {
|
||||
enablePreloadFramework = true;
|
||||
}
|
||||
|
||||
|
||||
storeConfigs.add(new FinStoreConfig(sdkKey, sdkSecret, apiServer, apmServer, "",
|
||||
fingerprint, cryptType, encryptServerData));
|
||||
fingerprint, cryptType, encryptServerData, enablePreloadFramework));
|
||||
}
|
||||
configBuilder.setFinStoreConfigs(storeConfigs);
|
||||
String userId = (String) configMap.get("userId");
|
||||
|
@ -216,6 +224,7 @@ public class InitSDKModule extends BaseApi {
|
|||
|
||||
}
|
||||
};
|
||||
FinAppClient.INSTANCE.preloadFramework(finAppConfig, application);
|
||||
FinAppClient.INSTANCE.init(application, finAppConfig, cb);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,11 +34,15 @@ class FinStoreConfig {
|
|||
/// 是否需要接口加密验证(初始化多服务器时使用)默认为不开启,当设置为YES时开启,接口返回加密数据并处理
|
||||
bool encryptServerData;
|
||||
|
||||
/// 是否开启预加载基础库
|
||||
bool enablePreloadFramework;
|
||||
|
||||
FinStoreConfig(this.sdkKey, this.sdkSecret, this.apiServer,
|
||||
{this.apmServer,
|
||||
this.cryptType = "MD5",
|
||||
this.fingerprint,
|
||||
this.encryptServerData = false});
|
||||
this.encryptServerData = false,
|
||||
this.enablePreloadFramework = false});
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
|
@ -48,7 +52,8 @@ class FinStoreConfig {
|
|||
"apmServer": apmServer,
|
||||
"cryptType": cryptType,
|
||||
"fingerprint": fingerprint,
|
||||
"encryptServerData": encryptServerData
|
||||
"encryptServerData": encryptServerData,
|
||||
"enablePreloadFramework": enablePreloadFramework
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue