简体   繁体   中英

How do I retrieve the photographs taken by the camera on a phone running Android OS?

I am developing an Android application that retrieves the photographs taken by the phone camera and converts it to an alternative format. How can I retrieve the photograph that has just been shot as well as those that have been shot some time ago but still exists on the phone?

Converting the image format for existing images is just a matter of recursing file storage for images, usually the sd card but not limited to it. As far as hooking into the existing camera application you'll have to review its source to see if that is possible but you can have a service listen for the camera button and start checking for new images to convert. Android does not keep a central database of images or discriminate between "camera" and "other sources" meaning someone or something will have to decide what to convert.

You also may want to consider using the existing camera app as a library and extending it so that you are guaranteed to get the image right after its created.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM