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
0 answers

Design an Android Service like Watchdog For collecting logs from remote devices and upload it to server

I want to create a bug reporting service in android which collects logs of crashes, ANRs and similar events. It should collect logs for Apps/JAVA Services/Native Services. I'm not sure which direction I should move forward, have checked out some…
0
votes
0 answers

CallRedirectionService Doesn't work from documentation

I'm trying to make the CallRedirectionService work. I have the following: This is the manifast
Ace
  • 1
0
votes
2 answers

How to use koin for Service

I was starting the foreground service by manually binding and then using its method. However, I recently came across Koin and found https://insert-koin.io/docs/reference/koin-compose/compose @Composable fun App(myService: MyService = koinInject())…
Cyber Avater
  • 1,494
  • 2
  • 9
  • 25
0
votes
0 answers

bindservice does not connect to the service

I try to connect to the service but I can not I can start the service it lansa the notification but does not bind when I call bindservice I already added the request foregraud service and already moved the startSevice to oncreate I took as a basis…
0
votes
1 answer

Unable to create service : Java.lang.ClassNotFoundException in Android

I have an Android application which uses a SDK library to send data. I packed the SDK library as .aar file and added the dependency in the App. I'm trying to replicate the following exception in my local that my users are experiencing. enter code…
0
votes
0 answers

With a bound service, will onUnbind() be called along with onDestroy() if system decides to kill the service?

If a service is deemed unimportant, it might be killed by the system. I am aware that onDestroy() is not guaranteed to be called when the process is killed too but in situations where the calls go through (like if the service is killed while process…
0
votes
0 answers

Why android has various types of service and is workManager an alternative to services

I'm learning Android and currently, I am dealing with the background stuff and came to know about two things services and workManager. Before I got started with any of the ones I got to know about different types of services like "Services,…
0
votes
0 answers

why does my timer service can't be stopped when revisiting the activity

I'm using a timer service and want to bind/unbind it on a button click in my main activiy. The issue is when I start my timer and exit the activity and come back and attempts to stop it, it doesn’t stop running. my Timer service code `public class…
0
votes
0 answers

Create button inside service

I want to ask for a solution from you guys, how do I create a button in the service then I can return the string value through the callback interface
0
votes
1 answer

How to use service in jetpack compose

I want to use service in jetpack compose. I am trying to bind services in compose app but it always return null to me. I tried this stack overflow. But it didn't work to me. Anyone guide me on this ? import android.app.Service import…
0
votes
0 answers

Accessibility Service + Recycler, how can I catch this moment?

Help me please. I use android accessibility service to scroll my recycler. Everything OK with scrolling process. But I can't understand, how can I define moment, when recycler is finished. I need to tell user something like: This is the end, there…
0
votes
1 answer

Custom Android service not found despite proper permissions and queries with SDK 33

In this project, I provide two example apps: a "service app" providing a service like this: ...
Victor Paléologue
  • 2,025
  • 1
  • 17
  • 27
0
votes
1 answer

Never call unbindService() method on a Service?

I have scenario(for theoretical purposes): What happens if, say, there is only one Activity that is bound to a Service and it decides to never call unbindService() method? Will the Service ever get destroyed, in this case?
Manish Kumar Sharma
  • 12,982
  • 9
  • 58
  • 105
0
votes
1 answer

How to send an initial message using ServiceConnection?

I have an android service, which is connected to a service connection. Upon initialization, I'd like to send a single String, for example "test message" to the Service connection. How would I do this? This is my Service class: public class…
0
votes
0 answers

Can a client technically use a services binder after unbinding from the service?

Background: I have a few services (open for other apps to use) which run in the same process. The RPC is implemented using AIDL and therefore the services have to be open to multiple threads. This leads me to the question: can a client still use a…
user19309143