Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

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

import android.provider.MediaStore;

public class Main {
    public static final int TAKE_VIDEO = 2;

    public static void takeVideo(Activity ac) {

        Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
        intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);

        ac.startActivityForResult(intent, TAKE_VIDEO);
    }
}