Skip to content Skip to sidebar Skip to footer

Intent To Select Photo Or Video

Possible Duplicate: Multiple MIME types in Android I have a requirement wherein I have to let the user select either a photo or a video. Can this be done in a single intent? Cur

Solution 1:

You can try out something like this:

android-file-dialog

This is allowing following feature too.

FORMAT_FILTER - files filter. If file name ends with one of filters the file will be displayed.

So, you can specify required filters with this and provide selection of different files to users.

Hope it helps you.

Thanks.

Solution 2:

Try this

Intenti=newIntent(Intent.ACTION_GET_CONTENT);
i.setType("image/*");
startActivityForResult(Intent.createChooser(i, "Pick a photo"), requestCode);

Haven't tested the result, but the Intent is started correctly (I have tested that)

Post a Comment for "Intent To Select Photo Or Video"