Пример #1
0
        protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
        {
            //   base.OnActivityResult(requestCode, resultCode, data);

            if (requestCode == StartStandalonePlayerRequest && resultCode != Result.Ok)
            {
                var errorReason = YouTubeStandalonePlayer.GetReturnedInitializationResult(data);
                if (errorReason.IsUserRecoverableError)
                {
                    errorReason.GetErrorDialog(this, 0).Show();
                }
                else
                {
                }
            }
        }
Пример #2
0
        protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
        {
            base.OnActivityResult(requestCode, resultCode, data);

            if (requestCode == StartStandalonePlayerRequest && resultCode != Result.Ok)
            {
                var errorReason = YouTubeStandalonePlayer.GetReturnedInitializationResult(data);
                if (errorReason.IsUserRecoverableError)
                {
                    errorReason.GetErrorDialog(this, 0).Show();
                }
                else
                {
                    var errorMessage = string.Format(GetString(Resource.String.error_player), errorReason);
                    Toast.MakeText(this, errorMessage, ToastLength.Long).Show();
                }
            }
        }
 protected override void OnActivityResult(int requestCode, [GeneratedEnum] Result resultCode, Intent data)
 {
     base.OnActivityResult(requestCode, resultCode, data);
     if (requestCode == REQ_START_STANDALONE_PLAYER && 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.Short).Show();
         }
     }
 }