package com.samples.camera.callactivities;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.provider.MediaStore;
import android.view.View;
import android.widget.Button;

public class CallCameraActivity extends Activity
		implements View.OnClickListener {
	
	private Button bImageCapture;
	private Button bVideoCapture;
	private Button bStillImage;
	private Button bVideoCamera;
		
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.main);
	    
		bImageCapture = (Button)findViewById(R.id.bImageCapture);
		bVideoCapture = (Button)findViewById(R.id.bVideoCapture);
		bStillImage = (Button)findViewById(R.id.bStillImage);
		bVideoCamera = (Button)findViewById(R.id.bVideoCamera);
		
		bImageCapture.setOnClickListener(this);
		bVideoCapture.setOnClickListener(this);
		bStillImage.setOnClickListener(this);
		bVideoCamera.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.bImageCapture:
			startActivity(new Intent(MediaStore.ACTION_IMAGE_CAPTURE));
			break;
		case R.id.bVideoCapture:
			startActivity(new Intent(MediaStore.ACTION_VIDEO_CAPTURE));
			break;
		case R.id.bStillImage:
			startActivity(new Intent(
					MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA));
			break;
		case R.id.bVideoCamera:
			startActivity(new Intent(
					MediaStore.INTENT_ACTION_VIDEO_CAMERA));
			break;
		}
		
	}
}