public void OnServiceDisconnected(ComponentName name) { if (Binder != null) { OnServiceDisconnectedEvent(Binder.Service); Binder.IsBound = false; Binder = null; } }
public void OnServiceConnected(ComponentName name, IBinder service) { var binder = service as SencillaServiceBinder; if (binder != null) { Binder = binder; Binder.IsBound = true; OnServiceConnectedEvent(binder.Service); } }