Open GoogleCodeExporter opened 8 years ago
I would really like this as well, but I have not yet found out how to send the
MotionEvents. Do you have a hint? All I can find is how to read them ...
Original comment by kenneth@hexad.dk
on 25 Oct 2011 at 3:31
It's definately harder than it looks, having looked at the SDK.
Suspect there's a method that's in the android source code somewhere, just not
documented (well, if at all).
Original comment by tonyhoyl...@gmail.com
on 25 Oct 2011 at 4:02
I am not sure it is just exposed as a function. It could be that Google decided
that a rogue app could send fake analog data and thus somehow compromise the
security of the device, like dial a costly number or similar. If this is the
case (which I think it is) it will only be possible to do with rooted devices.
Original comment by kenneth@hexad.dk
on 25 Oct 2011 at 8:08
You could get the current activity and call dispatchGenericMotionEvent on it..
provided you can get the current activity.
InputMethodManager has a dispatchTrackballEvent function, but alas it's not
public. That calls a similar function in InputMethodSession... that may be
enough. There's no dispatchGenericMotionEvent there, unless it's currently
undocumented (not helped by the non-availability of source for 3.0+).
II can't see why they would limit IMEs sending generic motion events as they're
specifically there for things like joysticks which aren't standard touch events
(and as such have no security risks beyond what an IME can do already).
Original comment by tonyhoyl...@gmail.com
on 30 Oct 2011 at 1:31
I have just seen that there is now an app that can make any BluezIME controller
send hardware buttons presses and analog data. That should make any Bluez IME
controller able to act like a Xperia controller, but it requires Android 3.1
and a rooted device:
https://play.google.com/store/apps/details?id=com.dancingpixelstudios.gamepadena
bler
It is not free, but cheap. I have no affiliation with the author of the app.
Original comment by kenneth@hexad.dk
on 10 Apr 2012 at 11:19
Original issue reported on code.google.com by
tonyhoyl...@gmail.com
on 25 Oct 2011 at 3:26