我正在使用相机意图进行视频录制,请参阅我的代码
Button makeVideo = (Button) findViewById(R.id.buttonmakeVideo );
makeVideo.setOnClickListener(new OnClickListener()
{
public void onClick(View v)
{
Intent intent = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE);
startActivityForResult(intent, REQUEST_VIDEO_CAPTURED);
}
});
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
// TODO Auto-generated method stub
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK)
{
if (requestCode == REQUEST_VIDEO_CAPTURED)
{
uriVideo = data.getData();
String timeStamp = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(new Date());
cameraVideoList.add(timeStamp);
adapter.notifyDataSetChanged();
cameraVideoURIList.add(uriVideo.toString());
}
}
}
我成功录制了视频并可以在我的应用中播放视频,但视频存储在相机内存中,我想在SD卡上创建一个目录,如dirMyVideos,并将视频存储在目录中,如何才能引导我进入这方面。
这是我的logcat