String videoId = "dD40VXFkusw";
int VIDEO_APP = 5551;
Intent videoClient = new Intent(Intent.ACTION_VIEW);
videoClient.setData(Uri.parse("http://m.youtube.com/watch?v="+videoId));
videoClient.setClassName("com.google.android.youtube","com.google.android.youtube.PlayerActivity");
startActivityForResult(videoClient, VIDEO_APP);
This used to work for me to show a youtube video in the native player but now I get an ActivityNotFoundException. Why is this?
(06-10 09:23:33.949: ERROR/AndroidRuntime(27869): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.google.android.youtube/com.google.android.youtube.PlayerActivity}; have you declared this activity in your AndroidManifest.xml?
)