科尔多瓦1.8.1 - Android电子history.back()不工作 [英] in Cordova 1.8.1 - Android history.back() not working

查看:135
本文介绍了科尔多瓦1.8.1 - Android电子history.back()不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发中的应用程序加载外部URL(http://example.com)到网页视图一个PhoneGap的应用程序。当我使用window.location.href浏览屏幕。我能不能用回软按钮美元web视图本身p $ psent回去了previous屏幕。
Android的硬后退按钮关闭后(这是罚款现在)。

I am developing a phonegap application in which the app loads the external url(http://example.com) into webview. When I navigate through the screen using window.location.href. I cant able to go back to the previous screen using the soft back button that present in the webview itself. The android hard back button closes the back(which is fine for now).

任何人都可以帮助我。

推荐答案

有同样的问题:如果jQuery Mobile的不创建历史表项,从Android手机的后退按钮将终止应用程序,因为,没有活动回去。

It is the same problem: If jquery mobile does not create history entries, the back-button from the android phone will terminate the app, because, there is no Activity to go back to.

如果您通过您的应用程序去forwrd,做一个pushState的: https://开头developer.mozilla.org/en-US/docs/DOM/Manipulating_the_browser_history

If you go forwrd through your app, make a pushState: https://developer.mozilla.org/en-US/docs/DOM/Manipulating_the_browser_history

如果您有历史记录条目,您的应用程序不会关闭,并希望软后退按钮将正常工作。

If you have history entries, your app will not close and hopefully the soft-back button will work.

这篇关于科尔多瓦1.8.1 - Android电子history.back()不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆