Create Intent to capture Video - Android Intent

Android examples for Intent:Take Video

Description

Create Intent to capture Video

Demo Code


//package com.java2s;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;

import android.provider.MediaStore;

public class Main {
    public static int REQUEST_CAPTURE_VIDEO = 3;

    public static void captureVideo(Context context) {
        Intent intent2 = new Intent();
        intent2.setAction(MediaStore.ACTION_VIDEO_CAPTURE);
        intent2.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0); // ???????
        ((Activity) context).startActivityForResult(intent2,
                REQUEST_CAPTURE_VIDEO);/* w w  w  .j av a2s  . c o m*/
    }
}

Related Tutorials