I am getting ActivityNotFoundException error when i am trying to run youtube api StandAlonePlayerActivity on ginger bread. Where as it runs fine on ICS
here is my l
I would suggest some improvements to @Nikola answer. It's possible to show localised dialog getErrorDialog() to handle some user-recoverable errors isUserRecoverableError. For example, when YouTube app is disabled in Settings.
val result = YouTubeApiServiceUtil.isYouTubeApiServiceAvailable(context)
when {
result == YouTubeInitializationResult.SUCCESS -> startYouTubeActivity()
result.isUserRecoverableError -> result.getErrorDialog(activity, 0).show()
else -> toast("Something went wrong!")
}