Android - check if device has a camera

The Corona docs state to use this to check if the device has a camera:

if media.hasSource( media.Camera ) then

However, this always returns false on Android devices. Does anyone know the workaround for this? [import]uid: 52127 topic_id: 20819 reply_id: 320819[/import]

This function will also return false if you did not give your app permission to use the camera as well. Please see sample app “Media\Camera” that is included with the Corona SDK on how to use this API. Also see its “build.settings” file on how to set the camera permission. [import]uid: 32256 topic_id: 20819 reply_id: 82067[/import]