One possible cause of what you describe is that the file has the right
codec for the sound, but not for the video. Verify what codec it has
for video and make sure that is supported on the phone. As
http://en.wikipedia.org/wiki/3GP_and_3G2 describes, the video stream
may be either H.263 OR H.264. Which does your phone support?

On Sep 29, 11:13 am, Anton Okolelov <[email protected]> wrote:
> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to