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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:04:30+00:00 2026-05-23T11:04:30+00:00

An example of this is most easily understood by thinking of Pandora for Android.

  • 0

An example of this is most easily understood by thinking of “Pandora for Android”.

My activity has a VideoView playing lectures from a class.
I would like to be able to switch from this Activity to another activity (In my application, or to a different application (home screen, some other app) ) without interruption.

Using the Pandora example I could go to the ‘switch radio stations’ view while playing music and I could go to the home screen and continue navigating on the phone seamlessly.

Is this possible for videos, or audio only? Can I just play the audio from a video file and then switch back easily?

  • 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-23T11:04:31+00:00Added an answer on May 23, 2026 at 11:04 am

    The general way this is handled (and how Pandora handles it) is to playback the music from a service on a background thread. VideoView can’t be used in this case as it’s a View and is tied to an activity.

    I would approach this by starting with the Android VideoView code and splitting it in two, one part to handle the UI and the other for video playback.

    Run the MediaPlayer in a background service and when your video activity is shown, have the service call MediaPlayer.setDisplay() with your video view surface, and call MediaPlayer.setDisplay() with null when your video view is hidden.

    Obviously this is much more complex than just using VideoView directly and requires starting a service and coordinating that with the UI. You could also probably get away with just running the MediaPlayer in a background thread and not a service.

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

Sidebar

Related Questions

Say for example this is my code: $query = SELECT * FROM ...; $exec_query
If this is a beginner's question, my apologies - most of my programming has
I'm thinking about using as a base some FIFO (for example, BoundedFifoBuffer from Apache
This is best illustrated with an example: class Cat { } class Dog {
Example: /** * This function will determine whether or not one string starts with
For example this article introduces them. What is the benefit? Static analysis seems cool
Take for example this table (let's call it BIN_TABLE ): +------+------+ | A |
I have for example this string: iCanSeeBluePeople and I need it to separate it
CSS3 allows developers to implement simple graphics without using images. For example this envelope
Trying to extract strings that are wrapped in double brackets. For example [[this is

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.