Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap HTML app and various alerts hang browser

Tags:

cordova

When testing phonegap app, I get the following three alerts and the browser just hangs. Running app from server. Many times these alerts popup before the Ripple plugin can start. How do I remove these.

Alert 1:

gap:["Device","getDeviceInfo","Device818329805"] 

Alert 2:

gap:["NetworkStatus","getConnectionInfo","NetworkStatus818329806"] 

Alert 3:

gap:["App","show","App818329807"] 
like image 533
lucuma Avatar asked Jun 04 '13 14:06

lucuma


1 Answers

If you're testing your app in your desktop browser, you can simply exclude the file. For Chrome:

<script type="text/javascript">     if (!navigator.userAgent.toLowerCase().match('chrome')) {         document.write("<script src='phonegap.js'><\/script>");     } </script> 

(This way you don't have to remember to uncomment the script link for your build process.)

like image 162
Andreas Avatar answered Sep 26 '22 04:09

Andreas