Add and Access a video file in android project -


i wanted run predefined video file when button clicked. have added video file res/raw folder in myvideapp project. need pass path videoview.setvideopath() in order play video.

how can access stored video file's actual path in android. note: don't want open file. want actual location of file pass video view.

i tried "path = this.getresources().getstring(r.raw.bbc);" not working since gives path relative current project. videoview needs absolute path.

thank you, regards, robo.

following snippet you.

            getwindow().setformat(pixelformat.translucent);             videoview = new videoview(this);             videoview.setmediacontroller(new mediacontroller(this));             videoview.setvideouri(uri.parse("android.resource://" + getpackagename() +"/" + r.raw.bbc);  //don't put extension             videoview.requestfocus();             setcontentview(videoview);             videoview.start(); 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -