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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:33:02+00:00 2026-06-03T03:33:02+00:00

in my application, I am going back and forth between two activities A and

  • 0

in my application, I am going back and forth between two activities A and B.

in activity A user chooses listView content and,

in activity B user starts to listen shoutcast.

I am using an outside AACPlayer library with 2.2 SDK.

While going back to activity A, I didnot want to player paused or stopped, which I can manage to do.
However each time I go back to activity A from B, a new instance is started and if I press a new shoutcast they start to play at the same with the previous.

My question is, what should I do to come back to the current instance of the activity B.

My going back implementation is

    public void onClick(View v) {
            switch (v.getId()){
            case R.id.buttonBack:    
                Intent info = new Intent(getBaseContext(),index.class);
                info.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
                HomeActivity.this.startActivity(info);
            break;
    }

Thank you very much.

  • 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-03T03:33:03+00:00Added an answer on June 3, 2026 at 3:33 am

    I solved the problem by using Static fields in activity A. I made the methods of AAC Player static.

    static void startPlayingRadio(radioChannel radioChannel){ ... }
    static void stopPlayingRadio(){ ... }   
    static boolean isRadioPlaying(){ ... }
    static boolean isRadioStopped(){ ... } 
    

    By this way I can start, stop or pause the radio player form activity B.

    This is also much more correct in the sense of implementation. Because there suppose to be only one radio player.

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

Sidebar

Related Questions

We have been going back and forth a lot around our office lately about
A colleague and I are going back and forth on this issue and I'm
For a clean data model, I'm going back and forth on this... Using an
I've got a C# application going that needs to send out an html email
In my application there are going to be lots of users, over 500. They
I am writing an application which is going to allows users to change the
I have an application that is going to work like a p2p-software where all
I have an application which is going to be distributed to a hosting platform,
So I'm building an application that is going to do a ton of code
I'm developing a web application that is going to be served from an OSGi

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.