Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Issue resolved! :)</p> <p>Turns out I was not including the phone gap library exactly as described in the phonegap build article. </p> <p>Check this article <a href="https://build.phonegap.com/docs/preparing-your-app" rel="nofollow">https://build.phonegap.com/docs/preparing-your-app</a></p> <p>You do not need to include this library on each page but just the index page, I am not sure how it makes any difference but then the "deviceready" event started firing after I removed any references to phonegap.js on any other page but the index.html.</p> <p>Second thing that I noticed was that for some reason my error handling as shown below stopped working after phonegap build.</p> <pre><code>switch(error.code) { case error.PERMISSION_DENIED: search.openPanelForSearch("Either the app was denied permission or the location srvice is currently turned off.", showInitialMap); break; case error.POSITION_UNAVAILABLE: search.openPanelForSearch("Geolocation information was unavailable. Would you like to try out a manual serach instead?", showInitialMap); break; case error.TIMEOUT: search.openPanelForSearch("Service was timed out since it took too long to retrieve the gelolcations. Would you like to try out a manual search instead?", showInitialMap); break; case error.UNKNOWN_ERROR: search.openPanelForSearch("Sorry an unknown error occurred. Would you like to try out a manual serach instead?", showInitialMap); break; } </code></pre> <p>I had to change it to below</p> <pre><code>switch(error.code) { case 1: search.openPanelForSearch("Either the app was denied permission or the location service is currently turned off.", showInitialMap); break; case 2: search.openPanelForSearch("Geolocation information was unavailable. Would you like to try out a manual search instead?", showInitialMap); break; case 3: search.openPanelForSearch("Service was timed out since it took too long to retrieve the gelolcations. Would you like to try out a manual serach instead?", showInitialMap); break; default: search.openPanelForSearch("Sorry an unknown error occurred. Would you like to try out a manual search instead?", showInitialMap); break; } </code></pre> <p>Hope this helps someone. Thanks.</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