コード例 #1
0
        public void OnInitializationFailure(IYouTubePlayerProvider p0, YouTubeInitializationResult youTubeInitializationResult)
        {
            // no implemented
            //  Toast.MakeText(this, youTubeInitializationResult.ToString(), ToastLength.Short).Show();

            throw new NotImplementedException();
        }
コード例 #2
0
 public void OnInitializationFailure(IYouTubePlayerProvider provider, YouTubeInitializationResult errorReason)
 {
     if (errorReason.IsUserRecoverableError) {
         errorReason.GetErrorDialog(this, RECOVERY_DIALOG_REQUEST).Show();
     } else {
         String errorMessage = String.Format(GetString(Resource.String.error_player), errorReason.ToString());
         Toast.MakeText(this, errorMessage, ToastLength.Long).Show();
     }
 }
コード例 #3
0
 public void OnInitializationFailure(IYouTubePlayerProvider p0, YouTubeInitializationResult errorReason)
 {
     if (errorReason.IsUserRecoverableError)
     {
         errorReason.GetErrorDialog(this, 1).Show();
     }
     else
     {
         Toast.MakeText(this, errorReason.ToString(), ToastLength.Short)?.Show();
     }
 }
コード例 #4
0
 public void OnInitializationFailure(IYouTubePlayerProvider provider, YouTubeInitializationResult errorReason)
 {
     if (errorReason.IsUserRecoverableError)
     {
         errorReason.GetErrorDialog(this, RecoveryRequest).Show();
     }
     else
     {
         var error = errorReason.ToString();
         Toast.MakeText(this, error, ToastLength.Long).Show();
     }
 }
コード例 #5
0
 public void OnInitializationFailure(IYouTubePlayerProvider provider, YouTubeInitializationResult errorReason)
 {
     if (errorReason.IsUserRecoverableError)
     {
         errorReason.GetErrorDialog(this, RECOVERY_DIALOG_REQUEST).Show();
     }
     else
     {
         String errorMessage = String.Format(GetString(Resource.String.error_player), errorReason.ToString());
         Toast.MakeText(this, errorMessage, ToastLength.Long).Show();
     }
 }
コード例 #6
0
 public void OnInitializationFailure(IYouTubePlayerProvider provider, YouTubeInitializationResult errorReason)
 {
     if (errorReason.IsUserRecoverableError)
     {
         errorReason.GetErrorDialog(this, RecoveryDialogRequest).Show();
     }
     else
     {
         var errorMessage = string.Format(GetString(Resource.String.error_player), errorReason);
         Toast.MakeText(this, errorMessage, ToastLength.Long).Show();
     }
 }
コード例 #7
0
 public void OnInitializationFailure(IYouTubePlayerProvider provider, YouTubeInitializationResult errorReason)
 {
     //if (errorReason.IsUserRecoverableError)
     //{
     //
     //}
     //else
     //{
     //    //String errorMessage = String.Format(
     //    //        GetString(Resource.String.ErrorMessage), errorReason.ToString());
     //    //Toast.MakeText(this, errorMessage, ToastLength.Long).Show();
     //}
 }
コード例 #8
0
        public void OnInitializationFailure(IYouTubePlayerProvider p0, YouTubeInitializationResult errorReason)
        {
            switch (errorReason.IsUserRecoverableError)
            {
            case true:
                errorReason.GetErrorDialog(this, 1).Show();
                break;

            default:
                Toast.MakeText(this, errorReason.ToString(), ToastLength.Short)?.Show();
                break;
            }
        }
コード例 #9
0
        private void CheckYouTubeApi()
        {
            YouTubeInitializationResult errorReason =
                YouTubeApiServiceUtil.IsYouTubeApiServiceAvailable(this);

            if (errorReason.IsUserRecoverableError)
            {
                errorReason.GetErrorDialog(this, RECOVERY_DIALOG_REQUEST).Show();
            }
            else if (errorReason != YouTubeInitializationResult.Success)
            {
                string errorMessage =
                    string.Format(Resources.GetString(Resource.String.error_player), errorReason.ToString());
                Toast.MakeText(this, errorMessage, ToastLength.Short).Show();
            }
        }
コード例 #10
0
        public void OnInitializationFailure(IYouTubePlayerProvider p0, YouTubeInitializationResult errorReason)
        {
            if (errorReason.IsUserRecoverableError)
            {
                errorReason.GetErrorDialog(this, 1).Show();
            }
            else
            {
                //String errorMessage = String.Format(GetString(Resource.String.error_player), errorReason.ToString());
                //Toast.MakeText(this, errorReason.ToString(), ToastLength.Long).Show();

                new AlertDialog.Builder(MainActivity.Instance)
                .SetTitle("Error playing video")
                .SetMessage("Youtube app must be installed in yout device to use this feature.")
                .Show();
            }
        }
 public void OnInitializationFailure(YouTubeThumbnailView thumbnailView, YouTubeInitializationResult errorReason)
 {
     if (errorReason.IsUserRecoverableError)
     {
         if (errorDialog == null || !errorDialog.IsShowing)
         {
             errorDialog = errorReason.GetErrorDialog(this, RECOVERY_DIALOG_REQUEST);
             errorDialog.Show();
         }
     }
     else
     {
         string errorMessage =
             string.Format(GetString(Resource.String.error_thumbnail_view), errorReason.ToString());
         Toast.MakeText(this, errorMessage, ToastLength.Short).Show();
     }
 }
コード例 #12
0
 public void OnInitializationFailure(IYouTubePlayerProvider p0, YouTubeInitializationResult p1)
 {
     try
     {
         if (p1.IsUserRecoverableError)
         {
             p1.GetErrorDialog(this, 1).Show();
         }
         else
         {
             Toast.MakeText(this, p1.ToString(), ToastLength.Short)?.Show();
         }
     }
     catch (Exception e)
     {
         Methods.DisplayReportResultTrack(e);
     }
 }
コード例 #13
0
 public void OnInitializationFailure(IYouTubePlayerProvider p0, YouTubeInitializationResult errorReason)
 {
     try
     {
         if (errorReason.IsUserRecoverableError)
         {
             errorReason.GetErrorDialog(MainContext, 1).Show();
         }
         else
         {
             Toast.MakeText(MainContext, errorReason.ToString(), ToastLength.Short).Show();
         }
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }
コード例 #14
0
 public void OnInitializationFailure(IYouTubePlayerProvider p0, YouTubeInitializationResult p1)
 {
     try
     {
         if (p1.IsUserRecoverableError)
         {
             p1.GetErrorDialog(this, 1).Show();
         }
         else
         {
             Toast.MakeText(this, p1.ToString(), ToastLength.Short).Show();
         }
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }
コード例 #15
0
 protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
 {
     base.OnActivityResult(requestCode, resultCode, data);
     if (requestCode == RegStartStandalonePlayer && resultCode != Result.Ok)
     {
         YouTubeInitializationResult errorReason =
             YouTubeStandalonePlayer.GetReturnedInitializationResult(data);
         if (errorReason.IsUserRecoverableError)
         {
             errorReason.GetErrorDialog(this, 0).Show();
         }
         else
         {
             String errorMessage =
                 String.Format(GetString(Resource.String.error_player), errorReason.ToString());
             Toast.MakeText(this, errorMessage, ToastLength.Long).Show();
         }
     }
 }
コード例 #16
0
 void YouTubeThumbnailView.IOnInitializedListener.OnInitializationFailure(YouTubeThumbnailView view, YouTubeInitializationResult result)
 {
     view.SetImageResource(Resource.Drawable.cart1);// no_thumbnail
 }
コード例 #17
0
 void IYouTubePlayerOnInitializedListener.OnInitializationFailure(IYouTubePlayerProvider provider, YouTubeInitializationResult result)
 {
     player = null;
 }
コード例 #18
0
 public void OnInitializationFailure(IYouTubePlayerProvider provider, YouTubeInitializationResult errorReason)
 {
     Toast.MakeText(this, "An error occured starting Youtube", ToastLength.Long).Show();
 }
コード例 #19
0
 public void OnInitializationFailure(IYouTubePlayerProvider p0, YouTubeInitializationResult p1)
 {
     //throw new NotImplementedException();
 }
コード例 #20
0
 public void OnInitializationFailure(YouTubeThumbnailView view, YouTubeInitializationResult loader)
 {
     view.SetImageResource(Resource.Drawable.no_thumbnail);
 }
コード例 #21
0
 public void OnInitializationFailure(IYouTubePlayerProvider p0, YouTubeInitializationResult p1)
 {
     this.player = null;
 }
コード例 #22
0
 void YouTubeThumbnailView.IOnInitializedListener.OnInitializationFailure(YouTubeThumbnailView thumbnailView, YouTubeInitializationResult errorReason)
 {
     if (errorReason.IsUserRecoverableError)
     {
         if (errorDialog == null || !errorDialog.IsShowing)
         {
             errorDialog = errorReason.GetErrorDialog(this, RecoveryDialogRequest);
             errorDialog.Show();
         }
     }
     else
     {
         var errorMessage = string.Format(GetString(Resource.String.error_thumbnail_view), errorReason);
         Toast.MakeText(this, errorMessage, ToastLength.Long).Show();
     }
 }
コード例 #23
0
 public void OnInitializationFailure(IYouTubePlayerProvider p0, YouTubeInitializationResult p1)
 {
     Finish ();
 }