Пример #1
0
 public void OnServiceDisconnected(ComponentName name)
 {
     Log.Debug(TAG, $"OnServiceDisconnected {name.ClassName}");
     IsConnected = false;
     Binder      = null;
     mainActivity.UpdateUiForUnboundService();
 }
Пример #2
0
        public void OnServiceConnected(ComponentName name, IBinder service)
        {
            Binder      = service as MedicineControlBinder;
            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;
        }