This article describes the simple call to pictures, videos, audio, recording and taking photos in Android. Share it for your reference, as follows:
//Select the image requestCode return logoIntent innerIntent = new Intent(Intent.ACTION_GET_CONTENT); //".GET_CONTENT" (contentType); //View type String IMAGE_UNSPECIFIED = "image/*";Intent wrapperIntent = (innerIntent, null); ((Activity) context).startActivityForResult(wrapperIntent, requestCode); //videoIntent innerIntent = new Intent(Intent.ACTION_GET_CONTENT); (contentType); //String VIDEO_UNSPECIFIED = "video/*"; Intent wrapperIntent = (innerIntent, null); ((Activity) context).startActivityForResult(wrapperIntent, requestCode); //Add audioIntent innerIntent = new Intent(Intent.ACTION_GET_CONTENT); (contentType); //String VIDEO_UNSPECIFIED = "video/*"; Intent wrapperIntent = (innerIntent, null); ((Activity) context).startActivityForResult(wrapperIntent, requestCode); //recordingIntent intent = new Intent(Intent.ACTION_GET_CONTENT); (ContentType.AUDIO_AMR); //String AUDIO_AMR = "audio/amr"; ("", ""); ((Activity) context).startActivityForResult(intent, requestCode); //Shoot the videoint durationLimit = getVideoCaptureDurationLimit(); //("", 60); Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); (MediaStore.EXTRA_VIDEO_QUALITY, 0); (MediaStore.EXTRA_SIZE_LIMIT, sizeLimit); (MediaStore.EXTRA_DURATION_LIMIT, durationLimit); startActivityForResult(intent, REQUEST_CODE_TAKE_VIDEO); //Take a photo REQUEST_CODE_TAKE_PICTURE is the returned identifierIntent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); //".IMAGE_CAPTURE"; (MediaStore.EXTRA_OUTPUT, .CONTENT_URI); // output,("content://mms/scrapSpace"); startActivityForResult(intent, REQUEST_CODE_TAKE_PICTURE);
For more information about Android related content, please check out the topic of this site:Android multimedia operation skills summary (audio, video, recording, etc.)》、《Android development introduction and advanced tutorial》、《Android View View Tips Summary》、《Android programming activity operation skills summary》、《Summary of Android's SQLite database skills》、《Summary of Android operating json format data skills》、《Android database operation skills summary》、《Android file operation skills summary》、《A summary of SD card operation methods for Android programming and development》、《Android resource operation skills summary"and"Android control usage summary》
I hope this article will be helpful to everyone's Android programming design.