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

Service dies on lock of the phone Android

I have an Android service that should run in background all the time is called from Activity on start like this: ServiceConnection _serviceConnection = new ServiceConnection() { public void onServiceConnected(ComponentName className,…
0
votes
1 answer

Why we pass super((String)IntentServiceClassName ) in constructor while extending IntentService class in Android

Why we pass super((String)IntentServiceClassName ) in constructor while extending IntentService class in Android. Why we use that construtor empty. and why with name >?? public class MyService extends IntentService { public static final int…
0
votes
0 answers

Android service in separate process with different main thread?

I found service in separate process invoked its onCreate method in 'main thread', but this 'main thread' is different with the application's main thread(compare by == operator), I've log the life cycle of the application and service, the onCreate…
0
votes
1 answer

When to bind a service

I'm developing an application which have a main activity with 5 tabs. In other words, that main activity contains a framelayout that can be replaced with 5 different fragments. Furthermore, the application can navigate to others activities from that…
FVod
  • 2,245
  • 5
  • 25
  • 52
0
votes
3 answers

Strange NullPointerException with service

I have a started service and some activities must bind to it to get some data before set the views. Everything is working fine but, some (rarely) times, I got a NullPointerException. My simplified activitiy is: public class MyActivity extends…
0
votes
1 answer

Bound service not binding correctly

I've looked all over the internet and cannot find a solution. I've found a few tutorials and my code seems to match up fine, including the android dev examples. The point of the app is to play multiple audio tracks at once, which I have done…
0
votes
1 answer

Confusion in Service Binding and Unbinding Android

I am using Service to do long running process. I bind the service in activity to initiate the process. Below is the code which binds the service. val intent = Intent(context,SaveSessionService::class.java) context.bindService(intent,…
User
  • 1,186
  • 4
  • 22
  • 36
0
votes
1 answer

Is is possible to run Android Service after app deinstallation?

i want to run a script even if the Task is destroyed. That works fine but is it possible to keep this service running, after the user destroyes the app? I read something about binding the service but this is not working for me.
polest
  • 51
  • 9
0
votes
0 answers

Launch application passing parameters service android

Please imagine the application is fully closed and i created a new thread in service. i didn't stop service. Question 1: Show a dialog or notification from a service and clicking it results in launch of application using parameters passed from…
vabhi vab
  • 419
  • 4
  • 11
0
votes
1 answer

Android service error Attempt to invoke virtual method

I am making an app, where a server in java sends a Place Array and other stuff in other activities. so I create a service to connect to the server from different activities. I have not implement server connection yet but I am simulating the server…
0
votes
0 answers

share a Bound service (that extend Binder class) with two app that runs in one proces

I had two apps that runs in the same process And there is a Bound service that extends Binder class Based on developer documentation: Extending the Binder class If your service is private to your own application and runs in the same process as the…
hamid_c
  • 849
  • 3
  • 11
  • 29
0
votes
0 answers

ANR in android.com.systemui after attempting to end Screencast

For some strange reason, which I'm not entirely sure why, I'm getting not only an ANR for my application, but also of the entire systemui. It's so bad that I HAVE to reboot, and after rebooting it has to "Optimize" all of my apps like it corrupted…
0
votes
0 answers

Android service binding null

I built this app just to learn android. It says the service binding is null when I try to invoke a method on it. Compiles fine and fails at run time. Thank you for your help! New error after moving loadAnimals() to onServiceConnected(): 11-14…
0
votes
1 answer

How To Call A Method In A Remote Service Using Messenger From An Activity

I went through a lot of stuff when getting into services. So i have a remote service which connects to a server and has to send and receive incoming messages and i used a remote service to do this because i need it to run almost all the time and…
0
votes
0 answers

Proguard makes my ConnectionService null

I have a fragment that binds to a running service. So to bind I first declare a ConnectionService field as private ServiceConnection mMyConnection = new ServiceConnection() { 
 @Override
 public void onServiceConnected(ComponentName…