目前安卓只能这样:
/**
- 5+内核初始化完成时触发
-
*/
@Override
public void onCoreInitEnd(ICore coreHandler) {
String appBasePath = "/apps/H5928EE6E";
String args = "{url:'http://www.baidu.com'}";app = SDK.startWebApp(activity, appBasePath, args, new IWebviewStateListener() { // 设置Webview事件监听,可在监监听内获取WebIvew加载内容的进度 @Override public Object onCallBack(int pType, Object pArgs) { switch (pType) { case IWebviewStateListener.ON_WEBVIEW_READY: IWebview webview = ((IWebview) pArgs);
只能设置appBasePath,不能像苹果那样可以设置路径到index.html 这一层,如果能设置到index.html这一层到话,我就可以在index.html后面加参数,比如:/apps/H5928EE6E/www/......./index.html?param=xxx
,我知道可以设置args,然后通过plus.runtime...来获取,但是 我需要的是在plusReady之前就能获取到参数。
麻烦了。
5 个评论
要回复文章请先登录或注册
hello青峰 (作者)
hello青峰 (作者)
DCloud_Android_zl
hello青峰 (作者)
DCloud_Android_zl