This document discusses developing applications for Google TV. It covers what Google TV is, developing native apps for it, creating second screen apps, and optimizing websites for the 10-foot user interface. Key points include using features like the left navigation bar, sending intents and URLs to control the Google TV, discovering devices over mDNS, and designing interfaces with large text, dark backgrounds, and simple navigation.
42. Second-Screen Apps
private void sendKeyEvent(final int keyEvent) {
// create new Thread to avoid network operations on UI Thread
new Thread(new Runnable() {
public void run() {
anymoteSender.sendKeyPress(keyEvent);
}
}).start();
43. Second-Screen Apps
private void sendKeyEvent(final int keyEvent) {
// create new Thread to avoid network operations on UI Thread
new Thread(new Runnable() {
public void run() {
anymoteSender.sendKeyPress(keyEvent);
}
}).start();
final Intent intent = new Intent();
intent.setAction ("com.example.googletv.myApp.VIEW_ACTION");
anymoteSender.sendUrl (intent.toUri(Intent.URI_INTENT_SCHEME));
44. Second-Screen Apps
private void sendKeyEvent(final int keyEvent) {
// create new Thread to avoid network operations on UI Thread
new Thread(new Runnable() {
public void run() {
anymoteSender.sendKeyPress(keyEvent);
}
}).start();
final Intent intent = new Intent();
intent.setAction ("com.example.googletv.myApp.VIEW_ACTION");
anymoteSender.sendUrl (intent.toUri(Intent.URI_INTENT_SCHEME));
final Intent intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("http://<webpage_url>");
anymoteSender.sendUrl (intent.toUri(Intent.URI_INTENT_SCHEME));