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

master
xiaoyu 2021-12-03 09:14:09 +08:00 committed by XuPeng
parent f7e17566be
commit 26dd288915
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"));
Integer sequence = (Integer) param.get("sequence");
Map<String, String> params = (Map) param.get("params");
// mContextFlutterActivity
// Android 6.07.0contextmContext
// 使Application Context
Context context = mContext.getApplicationContext();
if (params == null) {
if (sequence == null) {
FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, appId);
FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, appId);
} else {
FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, appId, sequence, null);
FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, appId, sequence, null);
}
} else {
FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, appId, params);
FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, appId, params);
}
// String apiServer = (String) param.get("apiServer");
// String apiPrefix = (String) param.get("apiPrefix");