Questions tagged [android-service-binding]

In Android applications, a bound service is an implementation of the Service class that allows other applications to bind to it and interact with it. Service binding is used to allow services to be consumed from other components.

In Android applications, a bound service is an implementation of the Service class that allows other applications to bind to it and interact with it. Service binding is used to allow services to be consumed from other components.

More Info

420 questions
0
votes
1 answer

Unable to get data from a broadcast receiver generated from a service?

I have defined a service named LocationService which is sending intent via LocalBroadcastManager like this : Intent intent = new Intent(ACTION_LOCATION_BROADCAST); intent.putExtra(EXTRA_LATITUDE, lat); intent.putExtra(EXTRA_LONGITUDE,…
0
votes
2 answers

Android Leaked Service Connection

I am using a JobIntent service to perform some operation. I am starting the Service from say Screen A. After the service performs its work I am sending a callback from JobIntent Service to the Screen A. Then immediately the Screen A finishes itself…
0
votes
1 answer

why public variables change in Binding Service after run App?

I use bind service in Android .I start Service and stop Service with button and it work correctly.The story: I press start service button so Service start then,I increase x with showint button and x increase well, then I close App without stopping…
Moh_beh
  • 251
  • 1
  • 3
  • 14
0
votes
1 answer

How to handle aidl service binding on orientation change

I am building an application (aidl service) that will be called through code in an Activity (Activity will be written by someone else and I have no control over it). Activity creates a binding to the service, call methods on the service and get the…
dcanh121
  • 4,665
  • 11
  • 37
  • 84
0
votes
0 answers

How to keep a Service alive for 24 hours?

I have an app that with CountDownTimer that executes a piece of code at the given timeframe. I have been researching the service and it seems that this may get killed depending on wether android needs more resources and/or if my process gets…
Beto
  • 806
  • 3
  • 12
  • 33
0
votes
1 answer

How do I connect widget to my background service which is used to play music?

I'm trying to build a basic music player but right now I'm stuck at making widget for it. Can someone tell me how do I connect widget to the background service? I'm using MediaBrowser,MediaController on the client side and…
0
votes
1 answer

Activity not rebinding to foreground service after onResume

I have an activity which I use to launch a foreground service which continues to run in the background, even when the activity is closed. I bind to this service since I want to re-use the same service when the activity is stopped and…
0
votes
1 answer

Accessing Arraylist from bind service returning empty

I am accessing marraylist variable of service and although it is initialized by data from Firebase but returning empty marraylist in Activity this variable is initialized in service array by fetching data from Firebase database and in toast I am…
0
votes
1 answer

How to receive click event in activity from a recycler-view adapter

EDITED on 14.11.2018: I would like to simplify my question, how can I receive a click event in the activity from the Fragment which contains a recycler-view and it has an adapter which handels the click event? The application looks the…
0
votes
0 answers

Implemetation options for Android services handling requests, polling data and sending data

I need to create a Service app, Requirements 1 a request handler accepts request when it is sent from the other in house apps installed on the same device, saves the data to SQLite, 2 another service, message sender within the service app, polls the…
0
votes
1 answer

Service being stopped

I am trying to show notification for an RSS feed in my android application. the background service works fine in some mobile. but the problem is Huawei phone always kills the background service. I have tried many solutions in the last 5 days, none…
0
votes
1 answer

Android bound service onStart does not work

I have a Service (Bound) which I am trying to start from my MainActivity.java. The below is my Main Activity code: public class MainActivity extends AppCompatActivity { Handler m_handler; Runnable m_handlerTask ; private static…
Thomas
  • 1,970
  • 4
  • 28
  • 59
0
votes
1 answer

How can use resultReceiver without startService?

I need get some progress of my intent service, but in my search I find the resultReceiver and looks good and easy to implement, but the examples what I see pass the receiver throw intent but a can't pass because my intent service its activate by…
0
votes
1 answer

How does stopping service affect the thread created with in the service?

I am creating an app which require a service. This service create a thread and called selfStop immediately. How does stopping the service affect the life cycle of created thread? Is there anyway to stop the service from the thread, if the service is…
mia
  • 1,148
  • 1
  • 11
  • 17
0
votes
3 answers

Long amount of time elapses before onServiceConnected() is called

I have an activity and a service running in different threads. It is a sound recorder for a night time. The problem comes when the service crashes for any reason (we can't avoid that crash, as it comes from a external library) in the middle of the…