7. Launch S Console
with Play button
Bluetooth pairing
using NFC tagging
Select a game
and Play!!
8.
9. @Override
public boolean dispatchKeyEvent(KeyEvent event)
{
// Get the GamePad key code
final int keyCode = event.getKeyCode();
// Process the GamePad key code
switch (keyCode)
{
// Left key is down
case KeyEvent.KEYCODE_DPAD_LEFT:
ProcessGamePad_Left();
break;
10. switch (keyCode)
{
// Left key is down
case KeyEvent.KEYCODE_DPAD_LEFT:
ProcessGamePad_Left();
break;
...
// X key is down
case KeyEvent.KEYCODE_BUTTON_X:
ProcessGamePad_X();
break;
…
11. @Override
public boolean dispatchGenericMotionEvent(MotionEvent ev)
{
// Get the motion value
float xValue = ev.getAxisValue(MotionEvent.AXIS_X);
...
float yValue = ev.getAxisValue(MotionEvent.AXIS_Y);
// Process motion event
if (x > X_MOTION_THRESHOLD)
{
12. // Process motion event
if (xValue > X_MOTION_THRESHOLD)
{
// Process..
}
...
if (yValue > Y_MOTION_THRESHOLD)
{
// Process..
}
...
}