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));