Debugging live device on Blackberry
A Bit of an “easter egg” when it comes to debugging BlackBerry phones, is the key combination ALT + lglg, which, if you type in on the home screen of a blackberry phone shows the system error log. If you clear this, then run your app, errors and alerts will be written here.
When trying to port an iPhone Phonegap app to BlackBerry Webworks, the camera wasn’t working right. I could see it opening the camera, but it didn’t close the camera app automatically, and no data seemed to be uploaded.
I used this code example straight from the demo code:
navigator.camera.getPicture(onCaptureSuccess, onCaptureFail,
{ destinationType: Camera.DestinationType.DATA_URL, quality: 50 });
But it appears that at Quality 50, the image data is still too big – I’m going to try reducing this, and I’ll update this post if it works.
*Update*
Using the camera on Phonegap 0.9.4 is a non-starter. There is a size limit of 1.5 MB per photo, and the quality parameter, along with targetWidth and targetHeight are ignored. Also, the native camera app will not close unless you ask the user to manually turn on key injection. (Options > Application Management > Select App > Edit Permissions > Interactions > Input Simulation > Allow).
Simple solution was to upgrade to Phongap 2.4.0 and then set the targetWidth and targetHeight to something more manageable.