I try to play video, but all I get is sound and black screen. I don't
understand what's wrong with the code. That video is 3gp, it works on
my phone if I run it using standard phone player (without my program).
I tryed VideoView, but no result...

Please help!

here's code:


package danilka.appl;

import android.media.MediaPlayer;
import android.view.SurfaceHolder;
import android.view.SurfaceView;

public class Answer implements Runnable {
        actiff mainActivity;
        MediaPlayer mp;

        public Answer(actiff mainActivity) {
                this.mainActivity = mainActivity;
        }

        public void showAnswer(int resid)
        {
        mp = MediaPlayer.create(mainActivity, R.raw.test);
        SurfaceView v = new SurfaceView(mainActivity);
        SurfaceHolder sh = v.getHolder();
        sh.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
        mp.setDisplay(sh);
        mainActivity.setContentView(v);
        mp.start();
        v.postDelayed(this, 2000);
        }

        @Override
        public void run() {
                mp.release();
                mainActivity.newQuestion();
        }
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to