ParkSangGwon / TedBottomPicker

TedBottomPicker is simple image picker using bottom sheet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mime type

MustafaDev-shaikh opened this issue · comments

Can we set mime type to allow user to select PDF or image like that.???

Yes you can use that code to support multiple mime types

example for pdf and image files

String[] mimeTypes = {"image/","application/pdf"};
Intent galleryIntent = new Intent(Intent.ACTION_GET_CONTENT, MediaStore.Images.Media.EXTERNAL_CONTENT_URI)
.setType("image/
|application/pdf")
.addCategory(Intent.CATEGORY_OPENABLE)
.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);