Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 514037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:28:59+00:00 2026-05-13T07:28:59+00:00

I am using Videoview to playback mp4 file from local machine using android emulator.

  • 0

I am using Videoview to playback mp4 file from local machine using android emulator.
I hear the audio, but the screen is blank and no video is seen.
Android SDK 2.0.1

Does anyone have an idea what is missing here:

package com.hello;

import android.app.Activity;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;

public class HelloAndroid extends Activity {

    VideoView vv;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.main);
        vv = (VideoView) findViewById(R.id.VideoView01);

        MediaController nc = new MediaController(this);
        vv.setMediaController(nc);

        vv.setVideoPath("/sdcard/yu.mp4");
        vv.requestFocus();
        vv.start();
    }

    public void onPause() {
        vv.stopPlayback();
    }
}

Main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

    <VideoView
        android:id="@+id/VideoView01"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"></VideoView>
</LinearLayout>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:29:00+00:00Added an answer on May 13, 2026 at 7:29 am

    I am facing a same issue with 2.0.1.But my question is how come the same video link works well with 2.0 and lower versions…?

    Update

    There is a bug filed regarding this issue…

    http://code.google.com/p/android/issues/detail?id=5696#makechanges

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing an Android App where I am playing video using VideoView,but the
I have an MP3 audio file that I want to play from my Android
I am using VideoView to play an mp4 video. I would like to give
Using a VideoView is it possible to set a scale factor for Android? By
I am trying to play Audio using videoView using MediaController. The Audio is playing
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I am using VideoView to display a video in my app. The problem is
My app plays a video using VideoView. I am using a LinearLayout to add
I have an app that displays a video using VideoView. The layout consists of
I am developing an Android App and would like to have a video file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.