안드로이드 개발 질문/답변
(글 수 45,052)
filename은
String filename = videocursor.getString(video_column_index);
이렇게 받아왔구요
private String filename;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
System.gc();
Intent i = getIntent();
Bundle extras = i.getExtras();
filename = extras.getString("videofilename");
VideoView vv = new VideoView(getApplicationContext());
setContentView(vv);
vv.setVideoPath(filename);
vv.setMediaController(new MediaController(this));
vv.requestFocus();
vv.start();
intent로 넘어와서 동영상을 재생시키는 부분인데
동영상 리스트를 클릭했을 때 재생이 되지 않습니다
어느부분이 잘못되었나요...??
아니면 filename을 받을 때 영상을 재생시키려면
video_column_index
이 파라미터 말고 다른걸 써야되는건가요???
2012.08.05 12:38:49
이게 private OnItemClickListener videogridlistener = new OnItemClickListener() {
public void onItemClick(AdapterView parent, View v, int position, long id) {
System.gc();
video_column_index = videocursor.getColumnIndexOrThrow(MediaStore.Video.Media.DATA);
videocursor.moveToPosition(position);
String filename = videocursor.getString(video_column_index);
Intent intent = new Intent(VideoActivity.this, ViewVideo.class);
intent.putExtra("videofilename", filename);
startActivity(intent);
}
};
를 통해 위의 클래스로 넘겨줘서 영상을 실행시키는 건데 단말에 깔아 작동시키면 클릭시 영상재생이 되질 않습니다
조언좀 부탁드립니다;;;




비디오 커서라는게뭐죠..
커서긴 커서인데 뭐가들어있죠..
로그캣을 보여주시는게 빠를거같은데..