tags:

views:

113

answers:

1

Just started writing java / android and I am trying to use android.widget.VideoView.

I set the video by using the setVideoPath('/path/filename') method, but can't seem to figure out how to get the path on an existing object?

I'm using methods such as 'getDuration()', and 'getCurrentPosition()' and they work great.. but where is a getPath method?

Thanks in advance.

+2  A: 

I think that is not possible. The idea is, after you call setVideoPath(), the MediaPlayer underneath is in "initialized" state and is no longer interested in the exact path. You should keep this information (what is the exact file you are playing) elsewhere.

Danail
Plus, it may not be a path at all, but a URI.
Mirko Nasato
Keeping the path+filename in a separate variable is a good idea, and solves my problem. Thanks :)
joet3ch