Beispiel #1
0
        public void OnServiceConnected(ComponentName name, IBinder service)
        {
            playbackBinder = service as PlaybackBinder;
              if (playbackBinder == null) {
            throw new InvalidOperationException("Cannot bind to any service other than " + nameof(PlaybackService));
              }

              OnPlaybackServiceBound();
        }
Beispiel #2
0
 public void OnServiceDisconnected(ComponentName name)
 {
     playbackBinder.PlaybackStatusChanged -= PlaybackStatusChanged;
       playbackBinder = null;
 }