I use PhoneGap 2.9.0 and SenchaTouch to develop my Android application (targetSdkVersion 16).
When I launch the application in Chrome, I have the following logs:
Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only. cordova.js:912 deviceready has not fired after 5 seconds. cordova.js:6725 Channel not fired: onCordovaConnectionReady cordova.js:6718 Channel not fired: onCordovaInfoReady cordova.js:6718
When I test it on a Samsung tablet (Android 4.1.2), the first line disappeared, but 3 events do not always fire.
However, it seems SenchaTouch is working quite well: views and interactions are displayed as I expect.
Here is the chapter in the index.html section:
<head> <meta charset="UTF-8"> <title>title</title> <script id="microloader" type="text/javascript" src="touch/microloader/development.js"></script> <style type="text/css"> some css here </style> <script type="text/javascript" charset="utf-8" src="pg/cordova.js"></script> <script type="text/javascript" charset="utf-8" src="pg/barcodescanner.js"></script> </head>
I use some phone APIs such as Camera and File. Since PhoneGap does not receive the deviceready event, the API is not available, therefore navigator.camera is undefined.
I did a hug study, but everything I tested does not solve the problem. Any tips are welcome. Thanks in advance.
panda source share