如何将参数传递给Cordova嵌入Webview

时间:2019-03-26 10:22:11

标签: android ios cordova cordova-plugins

当我点击按钮时,我有一个本机视图(Ios / Android),它称为cordova视图。现在,我必须将参数传递给cordova视图。有人知道该怎么做吗? Obs:对于Ios,我正在使用CDVViewController类:

CDVViewController* viewController = [CDVViewController new];
    viewController.view.frame = CGRectMake(0, 0, 320, 480);
    [self presentViewController:viewController animated:YES completion:nil];

Android CordovaActivity类

@Override public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
super.init();
// Load your application
launchUrl = "file:///android_asset/www/index.html";
loadUrl(launchUrl);
}

0 个答案:

没有答案