Put the problems listed, if there is a solution, I will write down, if you have a better solution, welcome message OH
PhoneGap 2.9 cannot trigger Deviceready event
Pro can see the console has a wooden error, if prompted Cordova_plugins.json 404 (Not Found), in the WWW directory, create a new empty file, named Cordova_ Plugins.json is good, Cordova when initialization will request this file, but PO Master has not found the use of this file, but without this file, Cordova initialization failure, naturally does not trigger Deviceready event.
StackOverflow on this issue has been discussed, http://stackoverflow.com/questions/16095757/ What-is-the-cordova-plugins-json-file-for-cordova-is-requesting-it-at-initializ.
PhoneGap Camera Callback Slow
Just met this problem, PO Master is very crash, in Samsung S4 so slow, that's no, ah, after debugging, found that slow is the picture size problem
Code below, marked red is the focus, will be photographed compressed to 640 wide, the speed of flying general.
Navigator.camera.getPicture (function (imageData) {
App.startloading (' uploading images ');
App.uploadimg (imagedata,function (data) {
Console.log (data)
}, function (message) {
Console.log (' Photo failed: ' + message ');
}, {
Quality:75,
DestinationType:Camera.DestinationType.DATA_URL,
Savetophotoalbum:true,
targetwidth:640,
targetheight:1138,
Correctorientation:true
});
Illegal access exception with Localstorage
Originally thought to be some version of Android support for Localstorage, later found that GetItem () the content is null, the Json.parse will throw this exception, http://stackoverflow.com/ Questions/12846485/illegal-access-exception-with-localstorage-on-android-gingerbread
So add a layer of judgment after the GetItem.
Iscroll Event Recurring Issue
This PO master in the study, temporarily used a variable to control the event only once, but the symptoms do not cure, GitHub on the relevant discussion
Cond...