public static Intent getChooseMediaIntent ( String mimeType ) { Intent intent = new Intent ( Intent . ACTION_GET_CONTENT ) ; intent . addCategory ( Intent . CATEGORY_OPENABLE ) ; intent . setType ( mimeType ) ; return intent ; }
Generate the appropriate intent to launch the document chooser to allow the user to pick an image to upload .