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

  • SEARCH
  • Home
  • 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 3877386
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:29:30+00:00 2026-05-19T22:29:30+00:00

Forgive me if this is a newbie question, but… When playing video, is it

  • 0

Forgive me if this is a newbie question, but…

When playing video, is it better to use VideoView/MediaPlayer, or is it better to use intent.ACTION_VIEW and let the user select his/her media player?

The videos that I need to play are very large mp4 files (20 meg – 50+ meg) which are not optimized for mobile. I have buffering issues when using VideoView/MediaPlayer. However, when I use intent.ACTION_VIEW, I can use something like RealPlayer, which does a better job of buffering (at least in my case). Plus, RealPlayer and the other players I’ve tried handle orientation changes without restarting the video like VideoView/MediaPlayer do. However, I don’t know if this second approach is “acceptable” from a user-experience perspective.

Here’s the code for my VideoView/MediaPlayer approach:

XML:

<VideoView android:id="@+id/videoView"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" />

Java:

public class VideoViewActivity extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.main);
        VideoView videoView = (VideoView) findViewById(R.id.videoView);
        MediaController mediaController = new MediaController(this);
        mediaController.setAnchorView(videoView);
        Uri video = Uri.parse("http://www.my.big.video.com/video.mp4");
        videoView.setMediaController(mediaController);
        videoView.setVideoURI(video);
        videoView.start();
}

And here’s the code for my second approach:

Java:

public class VideoViewActivity extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        String videoUrl = "http://www.my.big.video.com/video.mp4";
        Intent i = new Intent(Intent.ACTION_VIEW);  
        i.setData(Uri.parse(videoUrl));  
        startActivity(i); 
}

Suggestions?

  • 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-19T22:29:30+00:00Added an answer on May 19, 2026 at 10:29 pm

    You cannot assume the user has RealPlayer or any other specific media player so that approach is hoping the intent will open a media player which is able to handle the file well. To avoid the orientation change problem I locked the landscape of the VideoView to landscape (who wants to watch a video in portrait anyway?). I’m sure this is considered a cheap way out, but it works.

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

Sidebar

Related Questions

This is simple question but I am a newbie so please forgive my simple
Forgive me if this is a newbie question - but sadly that's what I
Forgive the complete newbie question here - I know this is really basic stuff,
Forgive me if this is a repeated question but I am having trouble finding
Forgive a newbie, I don't even know how to ask this question properly: I
I am an android newbie so forgive me if this question is simple. Basically
Forgive me if this screams newbie but what does => mean in C#? I
Forgive me if this is a silly question! But to run trinidad as a
I am a learning via a book so please forgive this newbie question. I
I'm a javascript newbie so please forgive me if this question is really basic.

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.