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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:51:35+00:00 2026-06-17T08:51:35+00:00

I have a test app that simply plays a video when it launches, and

  • 0

I have a test app that simply plays a video when it launches, and it works as expected when I launch the app from ADT/eclipse, but when I open the app normally from the app list on my Nexus 7 it will not play the video until I rotate the tablet to horizontal… (It restarts the video anytime you change orientation, but the video will not start on its own)

Here is the code:

 public class MainActivity extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.activity_main);
     VideoView video = (VideoView) findViewById(R.id.myvideo);
     video.setVideoPath("/sdcard/head.3gp");
     video.requestFocus();
     video.start();
    }
}

I have tested this with both the emulator and a Nexus 7 running Jelly Bean,

Questions:
Why does this behave differently when launched via ADT ?
Am I missing an initialization that needs to happen that ADT does for me?

  • 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-06-17T08:51:35+00:00Added an answer on June 17, 2026 at 8:51 am

    It may be that the app is simply paused in the background when you run it from your device, and is therefore resuming itself rather than launching from scratch. To force the app to start up from scratch, try force-stopping the app via the Settings menu and then relaunching it.

    That said, having the app resume from a paused state is an extremely common event on most devices, so you’ll want to make sure that your app behaves appropriately when users restore the app from a background state, and not just from a fresh launch.

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

Sidebar

Related Questions

I have a test winforms app with ThreadExceptionHandler that displays a message box when
I have a test project, with an App.config that sets up default values for
I have an app that uses EF. To test my stuff I generally wrap
We have multiple config files (app.DEV.config, app.TEST.config, etc) and a pre-build event that copies
I have a Windows app that contains a browser control that loads pages from
I have small test app: Socket socket = new Socket(jeck.ru, 80); PrintWriter pw =
I have a WPF test app for evaluating event-based serial port communication (vs. polling
I have a small Java test app in Netbeans where the main() class reads
I have to test a web app and its API for UTF-8 strings. Webapp
i have build a small test app in Flash Pro 5.5 overlayed with the

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.