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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:15:40+00:00 2026-05-31T05:15:40+00:00

I have a weird problem with an app. On startup it plays a video

  • 0

I have a weird problem with an app. On startup it plays a video clip, this is done by the use of threading. What I want to do is to make the main thread wait for the worker thread to finish before it continues.
However, whatever I do with the video instance within the thread I only get values that seems to be incorrect. For example video.GetHeight returns a negative integer value. IsPlaying always returns false even if the video is actually playing and so on.
The video starts and works perfectly but all the values from the other methods I try to call on the video instance within the thread returns weird values.
Anyone knows where the problem is?

Here is the Thread class:

private class ThreadClass extends Thread {
    public VideoView video;
    public int ID = -1;
    @Override public void run() {
        if(this.ID == 1)
        {
            video = (VideoView)findViewById(R.id.introvideo);
            video.setVideoPath("android.resource://" + getPackageName() + "/" + R.raw.intro);
            video.start();
            System.out.println("Input ID: " + this.ID);
        }
        else
            System.out.println("Unexpected ID (" + this.ID + ")");
    }


}
  • 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-31T05:15:41+00:00Added an answer on May 31, 2026 at 5:15 am

    Use UI threads. Check this !

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

Sidebar

Related Questions

This is a really weird problem: I have set up the authlogic_openid_selector_example app .
I have this weird problem.. I'm building an in-house app that should register all
I published my first app to the Android Market an have the weird problem,
I have a bit of a weird problem. I developed an app with MVC
I have this weird problem with setting up cookies with PHP. Everything worked fine
I have a weird problem, and I don't know if this is the default
I have a weird encoding problem from my PyQt app to my mysql database.
I have a pretty weird problem in my iPhone app which is, I think,
I have a weird problem, I have 2 testing devices running the same app
I have been puzzled by this weird problem and it got me stuck. Please

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.