Guest User

Untitled

a guest
Jul 31st, 2012
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. Fullscreen mode in android youtube application
  2. private String video_id[] = { "gZiKrWSzNBo", "mzpJq23cuKc" };
  3. private final static String YOUTUBE_URL = "http://www.youtube.com/watch?v=";
  4. private final static String YOUTUBE_APP = "com.google.android.youtube";
  5.  
  6. Intent youtube_intent = new Intent();
  7. youtube_intent.setPackage(YOUTUBE_APP);
  8. youtube_intent.setAction(Intent.ACTION_VIEW);
  9. youtube_intent.setData(Uri.parse(YOUTUBE_URL + video_id[position]
  10. + PLAYER_PARAMETERS));
  11. startActivity(youtube_intent);
Advertisement
Add Comment
Please, Sign In to add comment