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

How to set action for previous and next controls in ExoPlayer?

I am making a audio player app. I created a service for audio player and playback notification. I am facing problem with the previous/next buttons in the Player as well as the playback notification. The previous/next buttons in the audio playback…
user15787070
0
votes
0 answers

How to prevent termination of main app when the service is in foreground?

I'm currently trying to remake our company app that has been outsourced. We do not have access to the source code so its not possible to look at the code. Our outsourced app has a service running in the foreground with a notification. When the…
0
votes
0 answers

how to get instance of running accessibility service in android

I want to take a accessibility service instance and call there method in Activity. I tried taking AccessibilityService as = new AccessibilityService () as.doSomething() but this works for first time only.
0
votes
2 answers

Why Binders(used for IPC) even when activity and services are in the same process

Binders are used for Inter(not intra) Process Communication/Remote Method Invocation so why/how the communication between Activity and Service is possible via binders where there are no different processes involvement. When the very first component…
0
votes
0 answers

How to propertly send data to a long-time working service?

My app has a service that starts and stops independently of the main activity. The service can be considered to be running all the time. I am looking for the correct way to pass data to this service. There are several ways that I can see: Using a…
0
votes
1 answer

Properly unbind service from activity

I have a simple android app with an activity that binds a service. The basic code is like this: public class MyActivity extends AppCompatActivity { private MyService service; private boolean serviceIsBound; private final…
Josef
  • 304
  • 2
  • 14
0
votes
1 answer

Android: bind to remote service: crashes service

I'm trying to bind to a remote service of the Drozer test app (sieve), but I keep crashing this app with a NullPointerException, and I don't understand why. The basic idea is to send a PIN code to the sieve app and it will return a password. The…
0
votes
1 answer

Android: How to communicate between an activity and a service that is running in a different process?

I am starting a service in a different process from an activity. The service is designed to run even when the app is closed. After starting the service from the activity, I close the app. Now when I reopen the app the service may or may not be…
0
votes
1 answer

Determine the process name of a Manifest-registered Service

I have a client that binds a service. This client should wait 5 seconds asynchronously to bind the service, unless the process that the service lives inis already alive. To determine if the process is alive, it is necessary to determine what process…
0
votes
0 answers

Why do Android bound services load after Fragments?

My question is exactly as it says on the title. Why is it that Android bound services always load after a whole fragment lifecycle is complete? Bound services are meant to be loaded on the activity containing the fragment, so why is it that the…
0
votes
0 answers

Android bound service not destroyed after all clients unbind

I have 2 services A and B. A creates B and binds to B via the Context#bindService() with the CONTEXT_AUTO_CREATE flag. Normally when A unbinds from B, B is destroyed. Under this approach, A and B are running in the same process with A's package…
mango
  • 73
  • 1
  • 6
0
votes
0 answers

Transfer Images using IPC app to app communication on the same device

I want to know if there is any efficient way to make app to app communication using IPC. I went to the guide of services that uses AIDL from the docs. But what I really want is to have an image to transfer between them.(Images are high quality) The…
0
votes
0 answers

How to start a service and then bind to it from a fragment

I have a TimerService that I'd like to bind to with a TimerFragment, so I can call the Service's methods and observe its LiveData in the fragment. The problem I'm running into is that when I start my fragment, it's telling me that the lateinit var…
Cameron
  • 1,281
  • 1
  • 19
  • 40
0
votes
2 answers

Binding exoplayer from service to activity not working?

Following is my service class class LocalAudioService : Service() { var player: SimpleExoPlayer? = null private var playerNotificationManager: PlayerNotificationManager? = null private var mediaSession: MediaSessionCompat? = null …
0
votes
0 answers

Why wont my service BIND once I set the process atribute in Android 9+?

I am using this example to lean about AIDL: https://github.com/xamarin/monodroid-samples/tree/master/AIDLDemo/AIDLDemo The example is fairly simple, and it runs on Android 4.4, but I must run it on Android 9+. So I modified it a little. For example,…
Elydasian
  • 2,016
  • 5
  • 23
  • 41