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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:51:45+00:00 2026-05-13T23:51:45+00:00

Hi all i’ve ran into another problems with VideoView . Then video is playing,

  • 0

Hi all i’ve ran into another problems with VideoView.
Then video is playing, and I put device asleep, using hard button, onPause() is called. But it followed by:

03-17 11:26:33.779: WARN/ActivityManager(884): Activity pause timeout for HistoryRecord{4359f620 com.package/com.package.VideoViewActivity}

And then i have onStart()/onResume() again and Video starts playing. I’ve try to move code around onStart()/onStop() – doesn’t seems to make difference.

sample code :

public class VideoViewActivity extends Activity {


    private String path = "";
    private VideoView mVideoView;
    private static final String MEDIA_URL = "media_url";

    @Override
    public void onCreate(Bundle icicle) {

        super.onCreate(icicle);
        setContentView(R.layout.videoview);
        mVideoView = (VideoView)findViewById(R.id.surface_view);
        path = getIntent().getStringExtra(MEDIA_URL);
    }

    @Override
    public void onResume() {

        super.onResume();
        mVideoView.setVideoPath(path);
        mVideoView.setMediaController(new MediaController(this));
        mVideoView.requestFocus();
        mVideoView.start();
    }

    @Override
    public void onPause() {

        super.onPause();
        mVideoView.stopPlayback();

        mVideoView.setMediaController(null);
    }
}

Why is it happening? And how do I stop that?

It’s not a greatest experience than you put your device to sleep and it starts playing video

  • 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-13T23:51:45+00:00Added an answer on May 13, 2026 at 11:51 pm

    OK, Looks like the behavior is related to activity lifecycle and the fact that VideoViewActivity is set to landscape in the manifest. Adding

    android:configChanges="keyboardHidden|orientation" 
    

    for that activity
    seems to fix the problem and then you put device to sleep only onPause() called vs before – all lifecycle methods were executed.
    I’ll do more testing to make sure it fixed…

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
All, I am building a small site using PHP. In the site, I receive
All, I'm using wordpress with this and for some reason the eventDrop stopped working.
All, I'm using Facebook Connect (JS SDK) to authenticate a user to my site.
All I want is to make a simple user password login. I have put
All, I'm trying to split my MSTest test run into multiple runs because I'm
All the articles I've found via google are either obsolete or contradict one another.
All front-end developers know the pain of coding for Firefox, then viewing our then
all creating a cakephp(using 2.1.2) page. we prompt the user to enter how many
All, I'm inserting some text from a textarea in a mySQL database. I'm using

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.