0

I have code for lauch an android youtube application

private String video_id[] = { "gZiKrWSzNBo", "mzpJq23cuKc" };
private final static String YOUTUBE_URL = "http://www.youtube.com/watch?v=";
private final static String YOUTUBE_APP = "com.google.android.youtube";

Intent youtube_intent = new Intent();
youtube_intent.setPackage(YOUTUBE_APP);
youtube_intent.setAction(Intent.ACTION_VIEW);
youtube_intent.setData(Uri.parse(YOUTUBE_URL + video_id[position]
                + PLAYER_PARAMETERS));
        startActivity(youtube_intent);

How can I force this application to show video in fullscreen mode in android 3.2? And don't suggest videoview and embed player - this methods not working for me

4

1 に答える 1

3

As for YouTube v4.1.47, you can do the following:

Intent playIntent = new Intent(Intent.ACTION_VIEW);
playIntent.setData(Uri.parse(<yout_YouTube_url>));
playIntent.putExtra("force_fullscreen", true);

It might work on older versions, but I haven't tested it.

于 2012-12-11T12:58:37.727 に答える