Пример #1
0
 public override void OnMediaControllConnected()
 {
     if (voiceSearchParams != null)
     {
         var query = voiceSearchParams.GetString(Android.App.SearchManager.Query);
         SupportMediaController.GetTransportControls().PlayFromSearch(query, voiceSearchParams);
         voiceSearchParams = null;
     }
     //TODO: CurrentFragment.OnConnected();
 }
Пример #2
0
        private void OnItemClick(object sender, MediaBrowserCompat.MediaItem item)
        {
            if (item.IsPlayable)
            {
                SupportMediaController.GetTransportControls()
                .PlayFromMediaId(item.MediaId, null);

                var intent = new Intent(this, typeof(MainActivity));
                StartActivity(intent);
            }
        }
Пример #3
0
 private void PlayFromMediaId(string mediaId)
 {
     SupportMediaController.GetTransportControls()
     .PlayFromMediaId(mediaId, null);
 }
Пример #4
0
 private void PauseMedia()
 {
     SupportMediaController?.GetTransportControls().Pause();
 }
Пример #5
0
 private void PlayMedia()
 {
     SupportMediaController?.GetTransportControls().Play();
 }