//选择图片 requestCode 返回的标识
Intent intent = new Intent(Intent.ACTION_GET_CONTENT)
intent.setType(contentType)
Intent wrapperIntent = Intent.createChooser(intent, null)
((Activity) context).startActivityForResult(wrapperIntent, requestCode)
//添加音频
Intent intent = new Intent(Intent.ACTION_GET_CONTENT)
intent.setType(contentType)
Intent wrapperIntent = Intent.createChooser(intent, null)
((Activity) context).startActivityForResult(wrapperIntent, requestCode)
//拍摄视频
int durationLimit = getVideoCaptureDurationLimit()
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE)
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0)
intent.putExtra(MediaStore.EXTRA_SIZE_LIMIT, sizeLimit)
intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, durationLimit)
startActivityForResult(intent, REQUEST_CODE_TAKE_VIDEO)
//视频
Intent intent = new Intent(Intent.ACTION_GET_CONTENT)
intent.setType(contentType)
Intent wrapperIntent = Intent.createChooser(intent, null)
((Activity) context).startActivityForResult(wrapperIntent, requestCode)
//录音
Intent intent = new Intent(Intent.ACTION_GET_CONTENT)
intent.setType(ContentType.AUDIO_AMR)
intent.setClassName("com.android.soundrecorder",
"com.android.soundrecorder.SoundRecorder")
((Activity) context).startActivityForResult(intent, requestCode)
//拍照 REQUEST_CODE_TAKE_PICTURE 为返回的标识
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE)
intent.putExtra(MediaStore.EXTRA_OUTPUT, Mms.ScrapSpace.CONTENT_URI)
startActivityForResult(intent, REQUEST_CODE_TAKE_PICTURE)