Using Phonegap 1.1 and Ecplise with ADT and Android version 2.2. Followed documentation for calling phonegap camera API and returning URI as shown below. **********Example Code*************** function getPhoto(source) { navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50, destinationType: Camera.DestinationType.FILE_URI }); }
The above call fails in the emulator with effectively no error message. The "onFail" function is triggered, but the message object passed into the function is undefined. Not sure if it's something in my project setup in Eclipse开发者_开发技巧 or not, although i've followed the tutorial closely that describes step by step for creating a phonegap android app in eclipse.
Found the solution. Needed to explicitly assign a value to the SD Card storage parameter via Eclipse (Window...Android SDK and AVD Manager...Edit AVD...Enter a positive value in the SD Card Size and Save.). This resolved the issue
精彩评论