I have been playing with Service, but I cannot get them to run like I need. I need to call the Service functions from the Activity, and I use this
public class LocalBinder extends Binder {
    LocalService getService() {
        return LocalService.this;
    }
}
But how do I callback the Activity once a long network operation is done?
I want to show a spinner on the action bar while the service does something, and when it finishes to hide it. I also need it to persist on all different activities that have the same action bar.
Also, ServiceConnection is an asynchronous callback, so how do I bind to the service, wait for the callback and then change from case to case which function of the service to call?
 
     
    