Skip to content

Instantly share code, notes, and snippets.

@keiji
Created March 17, 2014 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keiji/9598675 to your computer and use it in GitHub Desktop.
Save keiji/9598675 to your computer and use it in GitHub Desktop.
YoutubeTest on Glass
package com.example.youtubetest;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class MainActivity extends Activity {
private static final String VIDEO_URL1 = "https://www.youtube.com/watch?v=INmtQXUXez8";
private static final String VIDEO_URL2 = "https://www.youtube.com/watch?v=UFy2H6GdjSM";
private static final String VIDEO_URL3 = "https://www.youtube.com/watch?v=gfuQmvZVieU";
private static final String VIDEO_URL = VIDEO_URL1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = new Intent();
intent.setAction("com.google.glass.action.VIDEOPLAYER");
intent.putExtra("video_url", VIDEO_URL);
startActivity(intent);
finish();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment