You can't play a resource file using VideoView by passing a pathname.
The file doesn't exist; it's just a binary blob inside the APK file.
If you create a content provider, you could pass a URI to setVideo().
I'm not entirely sure that will work because the video file might be
compressed inside
Ahhh. Thanks for your response. The emulator's behavior makes a lot
more sense now. I'll try out what you suggest.
Is this in the documentation anywhere? I looked around and everything
I can find seems to say that video and audio are handled the same way.
Maybe I just missed it, but if not this
Audio and video *are* handled the same way. The problem you're running
in to is twofold:
1) The string res/raw/yourfile.ext is a relative path to a file and
does not refer to a resource compiled in to your apk. If you want to
refer to a resource, you generally use its resource ID, e.g. something
3 matches
Mail list logo