fix:Android 7.0及以下系统版本设备,通过管理小程序第二次启动小程序无法启动的问题

master
xiaoyu 2021-12-03 09:14:09 +08:00
parent 2e8e13e36f
commit 5303b67264
1 changed files with 7 additions and 3 deletions

View File

@ -53,14 +53,18 @@ public class AppletModule extends BaseApi {
String appId = String.valueOf(param.get("appId")); String appId = String.valueOf(param.get("appId"));
Integer sequence = (Integer) param.get("sequence"); Integer sequence = (Integer) param.get("sequence");
Map<String, String> params = (Map) param.get("params"); Map<String, String> params = (Map) param.get("params");
// mContextFlutterActivity
// Android 6.07.0contextmContext
// 使Application Context
Context context = mContext.getApplicationContext();
if (params == null) { if (params == null) {
if (sequence == null) { if (sequence == null) {
FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, appId); FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, appId);
} else { } else {
FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, appId, sequence, null); FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, appId, sequence, null);
} }
} else { } else {
FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, appId, params); FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, appId, params);
} }
// String apiServer = (String) param.get("apiServer"); // String apiServer = (String) param.get("apiServer");
// String apiPrefix = (String) param.get("apiPrefix"); // String apiPrefix = (String) param.get("apiPrefix");