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 7667509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:07:19+00:00 2026-05-31T15:07:19+00:00

My code below to streaming video: VideoView vv = (VideoView)this.findViewById(R.id.screen_video); Uri uri = Uri.parse(URL);

  • 0

My code below to streaming video:

VideoView vv = (VideoView)this.findViewById(R.id.screen_video);
Uri uri = Uri.parse(URL);
vv.setVideoURI(uri);
vv.start();

It works.
But if the URL video’s format not support by android phone or pad.
It show a dialog, and not show the screen.
But it still streaming with black screen.
I want to get the error message, and access as an exception.
But I don’t know how to get it?

Another problem is that the streaming may crash cause by low speed wifi.
How to check it to wait while low speed wifi?

  • 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-31T15:07:21+00:00Added an answer on May 31, 2026 at 3:07 pm

    try this code,it work,

    public class PlayVideo extends Activity
    {
    
    
     private String videoPath ="url";
    
     private static ProgressDialog progressDialog;
     String videourl;  
        VideoView videoView ;
    
    
     protected void onCreate(Bundle savedInstanceState)
     {
    
      super.onCreate(savedInstanceState);
      setContentView(R.layout.play_video);
    
       videoView = (VideoView) findViewById(R.id.videoView);
    
    
       progressDialog = ProgressDialog.show(PlayVideo.this, "", "Buffering video...", true);
       progressDialog.setCancelable(true);  
    
    
          PlayVideo();
    
     }
     private void PlayVideo()
     {
      try
           {      
                  getWindow().setFormat(PixelFormat.TRANSLUCENT);
                  MediaController mediaController = new MediaController(PlayVideo.this);
                  mediaController.setAnchorView(videoView);           
    
                   Uri video = Uri.parse(videoPath );             
                   videoView.setMediaController(mediaController);
                   videoView.setVideoURI(video);
                   videoView.requestFocus();              
                   videoView.setOnPreparedListener(new OnPreparedListener()
                   {
    
                       public void onPrepared(MediaPlayer mp)
                       {                  
                           progressDialog.dismiss();     
                           videoView.start();
                       }
                   });           
    
    
                }
           catch(Exception e)
           {
                    progressDialog.dismiss();
                    System.out.println("Video Play Error :"+e.toString());
                    finish();
           }   
    
     }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Below given code is for video streaming. This is fine with IE9 and firefox
Below is a basic code bit in as3 flash.A simple video streaming example using
I'm using VideoView to display a rtsp streaming video. Below you can find a
This code below allows me to find the word error in all my files
The code below sets a select menu with UI selectmenu by $('.anyclass').selectmenu(); but the
The code below will validate required fields within currently visible fieldsets, but only if
The code below works well right now; however, it's serially executed. I'd like to
I'm using a code below to upload file (tens of MB) in streaming mode.
I play a video url using streaming player on blackberry. If the url returns
The code below is streaming the twitter public timeline for a variable which output

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.