Created
March 17, 2014 12:54
-
-
Save keiji/9598675 to your computer and use it in GitHub Desktop.
YoutubeTest on Glass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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