开发者

android - application displaying videos

开发者 https://www.devze.com 2023-01-06 16:15 出处:网络
how do i display videos retrieved from resources in my android application ?开发者_JAVA百科 MediaPlayer mp = new MediaPlayer();

how do i display videos retrieved from resources in my android application ?

开发者_JAVA百科
MediaPlayer mp = new MediaPlayer();
mp = MediaPlayer.create(context, R.raw.vid);
mp.start();

i have placed a vid.3gp file in my res/raw folder..

i am getting NullPointerException.. what changes do i need to make

why so??

do we need something called as Surface Holder or something similar ?


using the MediaPlayer you should be able to play video

0

精彩评论

暂无评论...
验证码 换一张
取 消