是否有与录像一样的守则?
if (resultCode == Activity.RESULT_CANCELED) {
// camera mode was canceled.
} else if (resultCode == Activity.RESULT_OK) {
// Took a picture, use the downsized camera image provided by default
Bitmap cameraPic = (Bitmap) data.getExtras().get("data");
if (cameraPic != null) {
try {
savePic(cameraPic);
} catch (Exception e) {
Log.e(DEBUG_TAG, "saveAvatar() with camera image failed.", e);
}
}
我试图做的是,能够利用摄像机摄像机摄取录像,并将该录像或该录像的拷贝留给我的特定目录。 这部法典必须照搬:
private void initTakeClip(){
Button takeClipButton = (Button) findViewById(R.id.takeClip);
takeClipButton.setOnClickListener(new OnClickListener(){
public void onClick(View v){
String strVideoPrompt = "Take your Video to add to your timeline!";
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE);
startActivityForResult(Intent.createChooser(cameraIntent, strVideoPrompt), TAKE_CLIP_REQUEST);
}
});
}
当时我不知道如何去看这个刚刚拍摄的具体录像,然后将其复制到我的照片/申请/项目——姓名/目录中。
在从记忆中添加一个已经从记忆中删除的剪辑时,也应当找到名字/档案地点:
private void initAddClip(){
Button addClipButton = (Button) findViewById(R.id.addClip);
addClipButton.setOnClickListener(new OnClickListener(){
public void onClick(View v){
String strAvatarPrompt = "Choose a picture to use as your avatar!";
Intent pickVideo = new Intent(Intent.ACTION_PICK);
pickVideo.setType("video/*");
startActivityForResult(Intent.createChooser(pickVideo, strAvatarPrompt), ADD_CLIP_REQUEST);
}
});
}
任何/所有帮助都值得赞赏。