Use the YouTubeIntents class in the Android Player API to gracefully degrade. Here's some sample code to detect what the user can do:
if(YouTubeIntents.isYouTubeInstalled(context)) {
if(YouTubeApiServiceUtil.isYouTubeApiServiceAvailable(context) == YouTubeInitializationResult.SUCCESS) {
// start the YouTube player
context.startActivity(
YouTubeStandalonePlayer.createVideoIntent((Activity) context, "developer_key", videoId));
} else if(YouTubeIntents.canResolvePlayVideoIntent(context)) {
// Start an intent to the YouTube app
context.startActivity(
YouTubeIntents.createPlayVideoIntent(context, videoId));
}
}
// Falls through: last resort - render a webview with an iframe
We walk through this code in our Google I/O talk from 2013, if you're curious. Start from around 6:17.