Basic problem related phonegap.

  • 1
  • Question
  • Updated 8 years ago
I am developing a project in phonegap and using jQueryMobile its working in iOS but in Android it appear error message {The connection to the server was successful.(file///android_asset/www/index.html) }. How can I solve this problem please relpy the solution if know and I wanna run this porject on both iOS & android....
Photo of Vikas

Vikas

  • 6 Posts
  • 0 Reply Likes

Posted 8 years ago

  • 1
Photo of Yi Ming Kuan

Yi Ming Kuan

  • 1840 Posts
  • 78 Reply Likes
Does the app take a long while to load before returning an unsuccessful connection error?

Android webviews time out if the page takes too long to load. To solve this, you'll have to optimize the Javascript load times of the file. If you're compiling the app locally you can also use the following line of code in the activity's onCreate function:

super.setIntegerProperty("loadUrlTimeoutValue", 60000); //1000 = 1 second

-yiming
Photo of Vikas

Vikas

  • 6 Posts
  • 0 Reply Likes
Hello,

Sir I am using jQuery & jQuery mobile and when I use following line of code:

super.setIntegerProperty("loadUrlTimeoutValue", 60000)

for solving my problem 'super' keyword is not supported and the flow of control is terminate from that line.