一键拍照:
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE );
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
try {
context.startActivity(intent);
} catch (Exception e) {
}
一键打开相机拍照位置:
Intent intent = new Intent(MediaStore.META_DATA_STILL_IMAGE_CAMERA_PREWARM_SERVICE );
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
try {
context.startActivity(intent);
} catch (Exception e) {
}
======================
一键录制:
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE );
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
try {
context.startActivity(intent);
} catch (Exception e) {
}
一键打开相机录像位置:
Intent intent = new Intent(MediaStore.INTENT_ACTION_VIDEO_CAMERA );
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
try {
context.startActivity(intent);
} catch (Exception e) {
}