开发者

Phonegap 1.1 Camera API (getPhoto method) failing when launched from Eclipse on Android 2.3 Emulator. No Error Code returned

开发者 https://www.devze.com 2023-04-12 05:04 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号