code: public static Intent getChooseMediaIntent(String mimeType){
          Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
          intent.addCategory(Intent.CATEGORY_OPENABLE);
          intent.setType(mimeType);
          return intent;
      }
docs: Generate the appropriate intent to launch the document chooser to allow the user
  to pick an image to upload.
  
  @see #PICK_MEDIA_REQUEST_CODE
  @param mimeType the MIME type you want to constrict the chooser to
  @return the choose media intent