Youtube API ActivityNotFoundException on Gingerbread
First check if the youtube service is available on your device, then try to launch that activity.
YouTubeApiServiceUtil.isYouTubeApiServiceAvailable(mContext)
. Also try installing the youtube app from Google play.
Tiny note from the documentation:
Note: Users need to run version 4.2.16 of the mobile YouTube app (or higher) to use the API.
Edit: This is how you use it:
if(YouTubeApiServiceUtil.isYouTubeApiServiceAvailable(mContext).equals(YouTubeInitializationResult.SUCCESS)){
//This means that your device has the Youtube API Service (the app) and you are safe to launch it.
}else{
// Log the outcome, take necessary measure, like playing the video in webview :)
}
See the YouTubeInitializationResult
enums here https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubeInitializationResult
Also the philosophy about the aforementioned class: https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubeApiServiceUtil