Hi.
I'm developing an app which can work both in PhoneGap and Browser. When use PhoneGap, I want to lock all the navigations in the native PhoneGap webView. So I use super.setBooleanProperty("loadInWebView", true); in the main activity. this works well when 0.9.6, but in rc1 this doesn't work. I'm using android version.
e.g.
in main.java:
super.loadUrl("http://xxx.xxx.com/login.html"); // this works
in js/html:
window.location = 'http://xxx.xxx.com/index.html'; // open in a new activity
<a href="http://xxx.xxx.com/index.html" > text</a>; // open in a new activity
window.location = 'http://xxx.xxx.com/subfolder/foo.html'; // open in a new activity
<a href="http://xxx.xxx.com/subfolder/foo.html" > text</a>; // open in a new activity
and if current directory is http://xxx.xxx.com/subfolder/foo.html, when I click a link to the parent directory such as http://xxx.xxx.com/index.html, a new browser opens. whatever loadInWebView is.
and if a new activity opened to load the new page, all the sessionStorage lost.
please tell me what can I do to lock all the pages in just one webview using PhoneGap?
I've got an idea, if we can config a trusted url/domain list within the native app? So that all the links which are included in the trusted list can be opened in just the original webview.
I'm developing an app which can work both in PhoneGap and Browser. When use PhoneGap, I want to lock all the navigations in the native PhoneGap webView. So I use super.setBooleanProperty("loadInWebView", true); in the main activity. this works well when 0.9.6, but in rc1 this doesn't work. I'm using android version.
e.g.
in main.java:
super.loadUrl("http://xxx.xxx.com/login.html"); // this works
in js/html:
window.location = 'http://xxx.xxx.com/index.html'; // open in a new activity
<a href="http://xxx.xxx.com/index.html" > text</a>; // open in a new activity
window.location = 'http://xxx.xxx.com/subfolder/foo.html'; // open in a new activity
<a href="http://xxx.xxx.com/subfolder/foo.html" > text</a>; // open in a new activity
and if current directory is http://xxx.xxx.com/subfolder/foo.html, when I click a link to the parent directory such as http://xxx.xxx.com/index.html, a new browser opens. whatever loadInWebView is.
and if a new activity opened to load the new page, all the sessionStorage lost.
please tell me what can I do to lock all the pages in just one webview using PhoneGap?
I've got an idea, if we can config a trusted url/domain list within the native app? So that all the links which are included in the trusted list can be opened in just the original webview.


