My code was working before. I don't why now i got the error.
My application use g1 phone recording an 3gp video, Then I use
following code try to play it, however I got an error "Sorry this
video cannot be played". This happened seems after an update from
Tmobile. Does anyone has same experience?

My code is below:
public class VideoPlay extends Activity implements
MediaPlayer.OnCompletionListener
{
        private VideoView mVideoView;
        private Uri     mUri;

        public void onCreate(Bundle icicle)
    {
        super.onCreate(icicle);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.videoplay);
        mVideoView = (VideoView) findViewById(R.id.video_play);
        mUri=Uri.parse(Common.mRecordedVideo.getAbsolutePath());
   //     mUri=Uri.parse(Common.mRecordedVideo.getAbsolutePath());
 //       mVideoView.setOnErrorListener(this);
        mVideoView.setOnCompletionListener(this);
        mVideoView.setVideoURI(mUri);
        mVideoView.setMediaController(new MediaController(this));
        mVideoView.requestFocus(); // make the video view handle keys
for seeking and pausing
        mVideoView.start();
    }

    @Override
    public void onPause() {
        mVideoView.stopPlayback();
        super.onPause();
    }



    public boolean onError(MediaPlayer player, int arg1, int arg2)
    {
        return false;
    }

    public void onCompletion(MediaPlayer mp)
    {
        finish();
    }
}
--~--~---------~--~----~------------~-------~--~----~
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