public void OnServiceDisconnected(ComponentName name) { Log.Debug(TAG, $"OnServiceDisconnected {name.ClassName}"); IsConnected = false; Binder = null; mainActivity.UpdateUiForUnboundService(); }
public void OnServiceConnected(ComponentName name, IBinder service) { Binder = service as TimestampBinder; IsConnected = this.Binder != null; string message = "onServiceConnected - "; Log.Debug(TAG, $"OnServiceConnected {name.ClassName}"); if (IsConnected) { message = message + " bound to service " + name.ClassName; mainActivity.UpdateUiForBoundService(); } else { message = message + " not bound to service " + name.ClassName; mainActivity.UpdateUiForUnboundService(); } Log.Info(TAG, message); //mainActivity.timestampMessageTextView.Text = message; }