Android examples for android.media:Video
pick Video
import android.app.Activity; import android.content.ContentValues; import android.content.Intent; import android.graphics.Bitmap; import android.net.Uri; import android.provider.MediaStore; public class Main{ public static final int REQUEST_CODE_TAKE_PHOTO = 0xF1; public static final int REQUEST_CODE_PICK_VIDEO = REQUEST_CODE_TAKE_PHOTO + 4; public static void pickVideo(Activity activity) { Intent intent = pickVideoIntent(); activity.startActivityForResult(intent, REQUEST_CODE_PICK_VIDEO); }/*from w w w . ja va 2s . c o m*/ public static void pickVideo(android.support.v4.app.Fragment fragment) { Intent intent = pickVideoIntent(); fragment.startActivityForResult(intent, REQUEST_CODE_PICK_VIDEO); } private static Intent pickVideoIntent() { Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("video/*"); // String VIDEO_UNSPECIFIED = "video/*"; // Intent wrapperIntent = Intent.createChooser(innerIntent, null); return intent; } }