Good question. I'm not quite sure. I just know that you need root to use it
with Bluetooth. I should look into whether there's a tethered way to use
the controller without root.

Thanks for the merge!

--Jamie Halpern
On Mar 21, 2013 10:09 AM, "Henrik Rydgård" <notifications@github.com> wrote:

> In android/src/com/henrikrydgard/libnative/NativeActivity.java:
>
> > +		case KeyEvent.KEYCODE_DPAD_RIGHT:
> > +			// Joysticks are supported in Honeycomb MR1 and later via the onGenericMotionEvent method.
> > +			if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1 && event.getSource() == InputDevice.SOURCE_JOYSTICK) {
> > +				return false;
> > +			}
> > +		default:
> > +			// send the rest of the keys through.
> > +			// TODO: get rid of the three special cases above by adjusting the native side of the code.
> > +			Log.d("JAMIE", "Key code: " + keyCode + ", KeyEvent: " + event);
> > +			NativeApp.keyDown(keyCode);
> > +			return true;
> > +		}
> > +	}
> > +
> > +	@Override
> > +	@TargetApi(12)
>
> Oh, okay. I've misunderstood something about how compat between versions
> works then, that's great :)
>
> Let's merge. Although isn't it possible to support the PS3 controller
> without root, too?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/hrydgard/native/pull/54/files#r3470829>
> .
>