Upload

Loading...

Nexus Q Pong

33,165

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Jul 12, 2012

Unlocked Nexus Q running a pong-like application using the Nexus Q as a controller. Code snippet included at the end of the video.

Hacked at BrickSimple LLC in Doylestown, PA - mobile development shop specializing in Android and iOS application development. Yes, we are hiring. jobs@bricksimple.com

Code Snippet:

@Override
public boolean dispatchKeyEvent(KeyEvent event) {
int action = event.getAction();
int keyCode = event.getKeyCode();

switch (keyCode) { case KeyEvent.KEYCODE_VOLUME_UP:
if (action == KeyEvent.ACTION_DOWN) {
...
}
return true;
case KeyEvent.KEYCODE_VOLUME_DOWN:
if (action == KeyEvent.ACTION_DOWN) {
...
}
return true;
case KeyEvent.KEYCODE_VOLUME_MUTE:
if (action == KeyEvent.ACTION_DOWN) { ...
}
return true;
default:
return super.dispatchKeyEvent(event);
}
}

Loading...

Advertisement
When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...