Help with video / audio

Last Updated:

  1. daveofgv

    daveofgv New Member

    I hope this is the correct place to post this. If not, please let me know.

    I am creating a small andriod app that plays one video with some audio. I am very very very new to java / android.

    I am using Eclipse. If I add one button to the app how would I call the video.

    This is not for any projects or for any type of school. I am making this for my HTC evo. I am not going to sell it or anything.

    If someone could help me I would really appreciate it.

    I know how to get an image but need help with video/audio

    Thanks in advanced.

  2. miXer

    miXer Well-Known Member


    For audio you need to import this one:

    And to start a audio file, call this:
    MediaPlayer mp = MediaPlayer.create(this, resId);


    For video you need to import this one: android.widget.VideoView

    And to start a video, you need a videoview:
    VideoView video = (VideoView) findViewById(;

    And to start the video, call this:
  3. What about getting a video from youtube to play in the video viewer? I want put a video I made that is on youtube into an app that plays the video when the app is opened.

Share This Page