android videoview set path
i'm trying to play a video through videoview , the video file i put in the
res/raw directory.
so i tried this :
Uri uri = Uri.parse("android.resource://"+this.getApplicationContext().getPackageName()+"logo.mp4");
splashVideo.setVideoURI(uri);
but it can't play开发者_JAVA百科 , could someone tell me , how should i set my file path in uri??
I believe instead of logo.mp4 you should be using R.raw.logo
You probably need to add a slash after the package name as well.
i also i found my answer.
it is :
mp4 can not be played on emulator , when i use GT-P1000 run my application ,
it worked fine........Orz
thx all
精彩评论