-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose android_app_set_motion_event_filter from native app glue #79
Comments
Yeah, this relates to quite a significant difference between how The This is important for system buttons, like volume up/down + camera buttons which applications don't normally want to override. The way this (roughly) works is that input events are dispatched to the root View which internally implements a notion of an 'InputStage' + 'AsyncInputStage' which are daisy chained together and allow events to be associated with an 'finish' handler. Two of these stages support forwarding events to an On the other hand With the Activity callbacks they are
This means that we can't do anything with the To account for special cases like the volume keys then The In android-activity we don't currently expose this idea of an event filter and so applications get the default filter. This means that If we were to expose this idea of an event filter then we could also run the same filter on top of the For the motion events, I'm not aware of any reason why we couldn't change the default filter so that all motion events are buffered and exposed to applications but if any events might need default handling when applications aren't interested in them, there would be a similar issue as with the volume keys. |
By default android_native_app_glue uses the filter which only listens to
SOURCE_TOUCHSCREEN (0x1002)
events.It doesn't seem to work on emulators - I saw
event->source == 0x5002
, can't even find a constant for that. The same problem I've experienced with the Samsung s-pen input devices.So it would be great to have an option to setup the filter or drop it completely.
The text was updated successfully, but these errors were encountered: