【发布时间】:2014-10-07 08:28:23
【问题描述】:
我正在使用cordova 3.6编写一个移动应用程序,这个应用程序只是打开一个与我的网站的移动版本对应的外部url
var ref = window.open('http://www.stackoverflow.com', '_self', 'location=no');
如果使用 _self 作为目标,则返回按钮行为很好,因为它在浏览的页面中正常工作,但问题是历史堆栈中的最后一个返回完成返回到我的索引页面,然后再次打开我的网址!窗口上的事件也不起作用。如何退出?
var ref = window.open('http://www.stackoverflow.com', '_blank', 'location=no');
如果使用 _self 作为目标,则返回按钮的行为是不一样的。在浏览过的页面中没有返回,无论我们是什么,都只是索引页面上的返回。如何将行为修改为与 _self 相同?
我被这两种解决方案卡住了:(
注意:我看到了这个similar question 但建议的代码
dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
public void onDismiss(DialogInterface dialog) {
closeDialog();
}
});
cordova 中不再存在 InAppBrowser.java 不再存在
【问题讨论】:
标签: android cordova cordova-3 inappbrowser