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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:33:36+00:00 2026-06-09T21:33:36+00:00

In android i am using two services and i want to move some details

  • 0

In android i am using two services and i want to move some details from one to another service. Becouse of this i create new class Settings with set and get methods but i don’t know how to connect two services with this one class file that i can move details from one service to another and remember each one.

for example:

i want to transfer property Boolean from service 1 to service 2 and then in service 2 check if this property is true and if is true then i execute some code in this seocnd service… hope is better explanation

class example:

public class Settings {
    private int currentAudioManager;
    private Boolean isChanged;

    public int getCurrentAudioManager() {
        return currentAudioManager;
    }

    public void setCurrentAudioManager(int currentAudioManager) {
        this.currentAudioManager = currentAudioManager;
    }
........

Hope you understand what i want.

  • 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-09T21:33:38+00:00Added an answer on June 9, 2026 at 9:33 pm

    You can register broadcast receiver and send broadcasts parceable data between your services.

    public class Service1 extends Service {
    
        @Override
        public void onCreate() {    
            super.onCreate();
            registerReceiver(recevier1,  new IntentFilter("YOUR_SERVICE_ACTION1")); 
    
            // if something happen in your service"
            sendBroadcast(new Intent("YOUR_SERVICE_ACTION2")); // send to second service
        }
    
        @Override
        public IBinder onBind(Intent intent) {      
            return null;
        }
    
        public void onDestroy() {
            unregisterReceiver(recevier1);
        };
    
        Service1Receiver recevier1 = new Service1Receiver();    
        private class Service1Receiver extends BroadcastReceiver{
    
            @Override
            public void onReceive(Context context, Intent intent) {     
                intent.getExtra("me.SERVICE");// handle your data
            }
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm consuming a web service from an Android device using HTTP(s) with SSL. A
I am trying to send string array from web service to android application using
I have setup an android test project that runs junit tests. It's using two
I am trying to serialize/deserialize JSON in Android using GSON. I have two classes
I would like to build two different versions of my app using different android:minSdkVersion.
I am creating an archive on Android using the code like this: OutputStream os
I've been assigned to create an RESTful Android application for an existing web service
I am currently using a custom service in my android application to retrieve a
I want to build a backend application to push messages from server to android
I'm working on Android application which is taking content from internet using JSON, I

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.