Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Sirs, I had the same problem when using Phonegap (Apache Cordova) and IFrames in Android Ice Cream Sandwich (4.0.3). </p> <p>To solve this problem, I had to edit Apache Cordova Source Code. I changed the org.apache.cordova.<strong>CordovaWebViewClient.java</strong> file, and commented this part of the code, and included the last line (<em>return false;</em>).</p> <p>So it now looks like this:</p> <pre><code> // All else // else { // // // If our app or file:, then load into a new Cordova webview container by starting a new instance of our activity. // // Our app continues to run. When BACK is pressed, our app is redisplayed. // if (url.startsWith("file://") || url.indexOf(this.ctx.baseUrl) == 0 || ctx.isUrlWhiteListed(url)) { // this.ctx.loadUrl(url); // } // // // If not our application, let default viewer handle // else { // try { // Intent intent = new Intent(Intent.ACTION_VIEW); // intent.setData(Uri.parse(url)); // ctx.startActivity(intent); // } catch (android.content.ActivityNotFoundException e) { // LOG.e(TAG, "Error loading url "+url, e); // } // } // } // return true; return false; </code></pre> <p>This problem only happens on Android ICS, but I changed the code for all my apps. I'm still doing tests.</p> <p>In my analysis, it seems that when you try to load a page inside a iFrame, the Android WebView on ICS interprets it as a new page request, and <strong>IT REPLACES THE MAIN APPLICATION!!</strong>, or in other words, it OPENS the requested page in the hole parent window.</p> <p>I left the rest of the code untouched. </p> <p>I hope it helps, like it did for me.</p> <p>Best regards.</p> <p>Alexandre Almeida</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload