This article illustrates a simple way to call pictures, video, audio, recording, and photographing in Android. Share to everyone for your reference, specific as follows:
Select the logo returned by the picture Requestcode Intent innerintent = new Intent (intent.action_get_content); "Android.intent.action.GET_CONTENT" Innerintent.settype (ContentType);
View type String image_unspecified = "image/*";
Intent wrapperintent = Intent.createchooser (innerintent, NULL);
(activity)-Startactivityforresult (Wrapperintent, Requestcode);
Video Intent innerintent = new Intent (intent.action_get_content); Innerintent.settype (ContentType);
String video_unspecified = "video/*";
Intent wrapperintent = Intent.createchooser (innerintent, NULL);
(activity)-Startactivityforresult (Wrapperintent, Requestcode);
Add Audio Intent innerintent = new Intent (intent.action_get_content); Innerintent.settype (ContentType);
String video_unspecified = "video/*";
Intent wrapperintent = Intent.createchooser (innerintent, NULL);
(activity)-Startactivityforresult (Wrapperintent, Requestcode);
Recording Intent Intent = new Intent (intent.action_get_content); Intent.settype (CONTENTTYPE.AUDIO_AMR); StrinG AUDIO_AMR = "audio/amr";
Intent.setclassname ("Com.android.soundrecorder", "Com.android.soundrecorder.SoundRecorder");
(activity)-Startactivityforresult (Intent, Requestcode); Shooting video int durationlimit = Getvideocapturedurationlimit ();
Systemproperties.getint ("Ro.media.enc.lprof.duration", 60);
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); Photo Request_code_take_picture for the returned identification Intent Intent = new Intent (mediastore.action_image_capture);
"Android.media.action.IMAGE_CAPTURE"; Intent.putextra (Mediastore.extra_output, Mms.ScrapSpace.CONTENT_URI);
Output,uri.parse ("Content://mms/scrapspace");
Startactivityforresult (Intent, request_code_take_picture);
For more information on Android-related content readers can view the site: "Android Multimedia how-to Summary (audio, video, recording, etc.)", "Android Development introduction and Advanced Course", "Android view summary of the tips", " The activity Operation skill summary of Android programming, "Android operation SQLite database Skill Summary", "Android operation JSON format Data technique summary", "Android database Operation skill Summary", "Android File Operation skill Summary "," Android programming development of SD card operation method Summary "," Android Resource Operation skills Summary "and" Android Control usage Summary "
I hope this article will help you with the Android program.