Forked from grovertb/SELECT MEDIA IMAGE or VIDEO - ANDROID
Created
January 30, 2018 08:01
-
-
Save BCsl/cce32ffeba998e43d427288fa1a38fe5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pick Audio file from Gallery: | |
//Use MediaStore.Audio.Media.EXTERNAL_CONTENT_URI | |
Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Audio.Media.EXTERNAL_CONTENT_URI); | |
Pick Video file from Gallery: | |
//Use MediaStore.Audio.Media.EXTERNAL_CONTENT_URI | |
Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Video.Media.EXTERNAL_CONTENT_URI); | |
Pick Image from gallery: | |
//Use MediaStore.Images.Media.EXTERNAL_CONTENT_URI | |
Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI); | |
Pick Media Files or images: | |
Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI); | |
intent.setType("image/* video/*"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment