SHAKTHI62 / openintents

Automatically exported from code.google.com/p/openintents
0 stars 0 forks source link

Idea: Media selection/creation OI reusable component #490

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In my open source app, I want to let users insert a picture/video/sound/etc, 
either from the SD card (file) or using the device's hardware (take a photo, 
record a video, record a sound, draw on touchscreen).

There are plenty of code snippets showing how to implement each of these 
things, but rather than re-inventing the wheel, it would be great if there was 
an OI reusable component that handles the whole activity of choosing a media 
file. I would just call this component, it would handle the UI, and return me 
the filepath to the media the user selected/created.

It would be very useful for content creation apps (CMS, blogging, lifefeed, 
notes, mindmapping, flashcards, ...)
See attached screenshot for how it could look like.

I used to ask the question on StackOverflow, but no such component seems to 
exist yet... 
http://stackoverflow.com/questions/7254037/android-open-source-activity-to-let-t
he-user-select-create-a-media

Original issue reported on code.google.com by nicolas.raoul@gmail.com on 11 Jan 2012 at 4:02

Attachments:

GoogleCodeExporter commented 9 years ago
Sounds like an interesting project.

However, reading through the comments here:
http://stackoverflow.com/questions/2708128/single-intent-to-let-user-take-pictur
e-or-pick-image-from-gallery-in-android

Especially the one from hackbod:
"Generally for the case where you want to say "i want the user to select for me 
X kind of content of some type," you would use GET_CONTENT. For example here 
you would use GET_CONTENT with type image/*, which would first present the user 
a list of things from which they can select images (gallery, camera, and 
whatever other apps have images to offer). – hackbod"

reply by Justin: "Except that doing that does not provide an option to use the 
camera."

So this seems to me like a bug in the Camera app - in that it does not provide 
the GET_CONTENT intent as it should.

The quickest way to fix this would be to write a small helper app that provides 
the GET_CONTENT intent for images/*, but actually simply forwards this request 
as a MediaStore.ACTION_IMAGE_CAPTURE to capture an image. It reads the result 
and provides it back to the calling application.

In this way, by simply using the GET_CONTENT intent, you would be provided with 
a list of all possible options, including camera, gallery, file manager, 
flickr, etc. etc.

Original comment by peli0...@googlemail.com on 23 Jan 2012 at 9:20