Cordoba WebView: TIME ERROR

I use jquery.min.js in my phonegap application, but it shows me a Cordoba WebView time error. I also tried

super.setIntegerProperty("loadUrlTimeoutValue", 10000); 

but it just takes time and after that time the same "Cordoba WebView: TIMEOUT ERROR!" is approaching. Please provide me with the right solution.

+8
android cordova
source share
4 answers

I think your main script is too long to execute:

 //code executed after the loading of the page (if your using jquery) $(function() { //if this method is too heavy and takes too long to execute, it will trigger the TIMEOUT ERROR. doSomeStuff(); }); 

There will be no need to add a timeout for this method to start the application, and then run a heavy script (you can display a loading image or something like that).

code snippet :

 //code executed after the loading of the page $(function() { //in mobile environment, this timeout leaves time for the app to launch before we start any heavy process. setTimeout(function(){ doSomeStuff(); },100); }); 
+1
source share

You can increase the timeout value, see link

 super.setIntegerProperty("loadUrlTimeoutValue", 60000); 

Update

In the example, I replaced my old code with this snippet, and it works:

I added import org.apache.cordova.* And I put super.loadUrl(Config.getStartUrl()) instead of the url method

 import org.apache.cordova.*; import android.os.Bundle; public class MyApp extends DroidGap { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.loadUrl(Config.getStartUrl()); } 
0
source share

receiving it timeout from the Corodova web browser with restarting the application from the same AVD will cure this, you should not give the “run as” command to the application, just select the application from your phone or AVD and run it again it could be of your device is very slow and does not give a quick response to the variables that you indicated the identification of the value

I -

0
source share

This is a problem with emulators, since the system is slow, so it takes time and giving Cordoba WebView. So I run it on a device with good memory and it works.

0
source share

All Articles