loadInWebView not work in rc1?

  • 1
  • Question
  • Updated 9 years ago
  • Doesn't Need an Answer
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.
Photo of dededemi

dededemi

  • 2 Posts
  • 0 Reply Likes

Posted 9 years ago

  • 1
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
Hi,

Do you have a paid support plan? If so, you should file this issue through our private forum - the details are available in the email you got when you registered.

If not, please check the PhoneGap Google Group for further support:
http://groups.google.com/group/phoneg...
Photo of Fil Maj

Fil Maj

  • 139 Posts
  • 15 Reply Likes
This should also be filed to the project page for phonegap-android: http://www.github.com/phonegap/phoneg...

If you can provide what device + Android OS version you are seeing this issue on, that will help in resolving the problem.
Photo of dededemi

dededemi

  • 2 Posts
  • 0 Reply Likes
I'm testing the app on Android emulator 2.2 and HTC Aria(2.2). I'll try to find a way in google group. Thanks a lot.