I am building an Android application where part of the functionality involves users taking images and recording video.
For the application there is a need to set a specific resolution for both the images and the video. Is it possible to specify the resolution parameters and then use a camera intent to capture images and video or do I need to build my own camera activity?
Any advice would be greatly appreciated.
Edit: I did some additional research and had a look at http://developer.android.com/guide/topics/media/camera.html#intents.
If I understand correctly there is no option to specify resolution parameters when using the Image capture intent http://developer.android.com/reference/android/provider/MediaStore.html#ACTION_IMAGE_CAPTURE.
For the Video capture intent it seems I have the option to use the Extra Video Quality parameter, however that only gives me the option of high quality and low quality (which I am not quite sure what corresponds to in terms of resolution) http://developer.android.com/reference/android/provider/MediaStore.html#EXTRA_VIDEO_QUALITY
It seems I best get started developing my own image and video activities then, unless I missed some other options with the image and video intent.
Camera intent starts external camera applciation which MAY use your hints (but MIGHT NOT). The activity/application is non standard (phone vendor dependent), as well as the concrete implementation of the camera software.
You can also use the camera api ( working examples are in this project: http://sourceforge.net/projects/javaocr/ ) which allows you to:
Conclusion: cameras in android devices are different and the camera API is underdocumented mess. So be as defensive as possible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With