4
다음과 비슷한 코드를 비디오에도 적용 할 수 있습니까? 내가 뭘하려고 오전Intent에서 비디오를 가져 와서 디렉토리에 저장하는 방법?
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);
}
});
}
난 그냥에 대한 다음 내 SD/APPNAME/프로젝트 이름/디렉토리로 복사 한 후 바로 찍은 특정 비디오를 받고 이동하는 방법을 모른다 : 이것은 내가 클립을해야 코드 .
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);
}
});
}
모든/모든 도움을 주시면 감사하겠습니다 :
같은 내 디렉토리 메모리에서 이미 클립을 추가 할 때 이름/파일 위치를 가져 오는 경우입니다.
감사를 사용하여 Seantron .. – Kalpesh
FileInputStream fis = openFilePath (videoPath); 이 진술에 나는 혼란스럽고 읽을 수가 없다 ...... 나를 도울 수 있니? – Kalpesh