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 = 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;
        }