Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Phonegap - Load URL Error Message
    text
    copied!<p>Myself and a few others have been testing my Android application for a couple weeks now and have not experienced any major issues yet. Recently, I was in a location that has no wi-fi and my phone has very poor service. Two times, back-to-back, when I launched the application, after set timeout for the splashscreen expired, it threw the error message "There was a network error. (file:///android_asset/www/index.html)". Other than those two times I have not been able to reproduce the issue, nor have any of the other testers. I've tried reproducing it in areas with little to no service and by turning my data off but I can't seem to make it happen again. The app does get the users location but even when I turn off my data and/or location services it still loads fine.<br /></p> <p>My main question is, after I sign and release the application to Google Play, is it possible for an end user to see this same error message and if so, how/where is it best to handle a situation such as this?<br /></p> <p>MainActivity.java</p> <pre><code>@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setIntegerProperty("splashscreen", R.drawable.splash); super.loadUrl("file:///android_asset/www/index.html", 5000); } </code></pre> <p>Is there anything else I should be doing in my java file or anything specific in my index.html file? Is it good practice to load a different .html file, which just redirects to index.html?</p> <p>I only have the scripts included that I am using and only the necessary permission in my manifest file.</p> <p>Although this has only happened a couple of times and I have not been unable to reproduce it, if an end user can get the same error, I would prefer it to be one that is much more user friendly. On the other hand, if after signing and releasing it on Google Play the error gets handled differently, (possibly what I have seen when an app doesn't respond and you are given the option of reporting it to the developer) that would be great!</p> <p>My reasoning for the statement above, regarding it being handled differently after releasing it to Google Play, is because I have been installing it on the phones from Eclipse. Not sure if that could be why but thought it might be good to include that detail.</p>
 

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