I need to know if a specific service is available (running or can be created) before calling Context.bindService
.
Is there a way to check that ?
I need to know if a specific service is available (running or can be created) before calling Context.bindService
.
Is there a way to check that ?
please see the comments
ServiceConnection serviceConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
// capture the service object , check for alive or not
service.isBinderAlive();
}
@Override
public void onServiceDisconnected(ComponentName name) {
}
};