I am having some problems with Phonegap and the Android Camera API. I can get it to work on one device, but not another.. I have heard of many others facing similar issues with no image data being returned to javascript from a device’s camera.
I am attempting to use the sample app code from here: http://docs.phonegap.com/en/1.3.0/phonegap_media_capture_capture.md.html#capture.captureImage
I have two physical devices I am testing on, an original Motorola Droid, and a Motorola Droid 3.
On the Motorola Droid, the app works perfectly and the image is captured and returned to my app without a hitch.
Using the Droid 3 however, is a different story. I can launch the camera no problem, take the picture, and then click “Done” and return to the app. The only issue is, the image data never shows up with it.
I have heard/read many things in the past day concerning this issue that I think may be related to the problem:
-
Motorola included a really poor stock phone app with the Droid 3, and this could be causing performance issues.
-
The image attempting to be returned by the Droid 3 is too high quality (and as a result too big of a file) for javascript to handle. (There is no way to set the resolution of images on the Droid 3’s stock camera.)
-
The app is “reloading” itself instantaneously after receiving the image data (perhaps because it is too big?) and as a result, when it loads again, the image data from just a second ago no longer exists.
For now I will just push onward with development and continue to test on the old device, but this is really something that I am not feeling good about. I know that the Droid 3 is not the only device to face these issues, and because I am interested in developing simple but commercial apps with Phonegap, this is very important to me that my application will work seamlessly across devices.
Apparently the answer is that it’s an issue with several Motorola devices due to some bloatware that is built into the phone, maybe moto-blur.
The camera app never fires an event returning the image data back to the app after the user captures it (in these devices).
I’m setting this as the correct answer for now, if someone finds this later on and has updated information or a workaround, I will gladly update it, just message me 🙂