Created
October 9, 2016 21:58
-
-
Save grovertb/a3ff74e1c589fa8df0db1416b1ac727e 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