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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:22:02+00:00 2026-05-31T04:22:02+00:00

Does anyone know why me application only returns wrong values when printing out the

  • 0

Does anyone know why me application only returns wrong values when printing out the variables within the VideoView?

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    VideoView video = (VideoView)findViewById(R.id.introvideo);
    VideoThread IntroClip = new VideoThread();
    IntroClip.execute(video);
}

private class VideoThread extends AsyncTask<VideoView, Integer, VideoView> {
        @Override
        protected VideoView doInBackground(VideoView... video) {
        video[0].setVideoPath("android.resource://" + getPackageName() + "/" + R.raw.intro);
            return video[0];
        }

    protected void onPostExecute(VideoView video) {
        video.start();
    }
}

If I try to print video.getheight it is always 0, video.IsPlaying is always false and so on.
I have to find out when the video has stopped playing. In other words something like this in the onCreate-method:

while(video.IsPlaying())
{



}

 /*Stopped playing, continue...*/

But the value is as mentioned always false :-/

  • 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-31T04:22:03+00:00Added an answer on May 31, 2026 at 4:22 am

    Found a solution:

    VideoThread IntroClip = new VideoThread();
    IntroClip.execute(video);
        video.setOnCompletionListener(new MediaPlayer.OnCompletionListener(){
            public void onCompletion(MediaPlayer mp) {
                setContentView(R.layout.loginmenu);
            }
        });
    

    Refer to How to start activity after VideoView end

    Greetings!

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

Sidebar

Related Questions

Does anyone here know of a Javascript application (something similar to Lightbox, only not
Does anyone know how to change icons in Silverlight outofbrowser application?
Does anyone know of an easy 3D modeling application like sketchup but is opensource?
Does anyone know if (and how) I can build an application (Java/Ruby/whatever) doing REST
Does anyone know of a library that enables you to run an application inside
in vb 2008 express this option is available under application properties. does anyone know
Does anyone know how to get the Websphere Application Server for developers (v6.1) installed
Does anyone know of any publicly available Question answering applications which have built using
Does anyone know if there is a limit to the number of applications I
Does any one know how to connect my c# console application to .net remoting

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.