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

[Android] Touch not working on some device #953

Closed
r-e-d opened this Issue Aug 24, 2015 · 5 comments

Comments

3 participants
@r-e-d
Contributor

r-e-d commented Aug 24, 2015

On my tablet (Sony Xperia Z4), AInputEvent_getSource returns 20482 (AINPUT_SOURCE_TOUCHSCREEN & AINPUT_SOURCE_STYLUS) instead of only AINPUT_SOURCE_TOUCHSCREEN for touch events. I don't know if this is expected or if it's a bug in the android of my device.

One solution if to change the check in processMotionEvent and processPointerEvent to device & AINPUT_SOURCE_TOUCHSCREEN.

Also these functions will forward an uninitialized event if the type is neither AINPUT_SOURCE_MOUSE nor AINPUT_SOURCE_TOUCHSCREEN.

@MarioLiebisch

This comment has been minimized.

Show comment
Hide comment
@MarioLiebisch

MarioLiebisch Aug 24, 2015

Member

Hm, have to check this. How do you input stuff? Your finger or indeed some stylus?

Member

MarioLiebisch commented Aug 24, 2015

Hm, have to check this. How do you input stuff? Your finger or indeed some stylus?

@r-e-d

This comment has been minimized.

Show comment
Hide comment
@r-e-d

r-e-d Aug 24, 2015

Contributor

I only use finger. I don't have a stylus :)

Contributor

r-e-d commented Aug 24, 2015

I only use finger. I don't have a stylus :)

MarioLiebisch added a commit that referenced this issue Aug 25, 2015

Android: Accept touch events from "multiple" devices
Attempt to fix issue #953, although I can't really say whether this is
indeed some driver thing. All snippets I've found use exact comparison
only (usually switches).
@MarioLiebisch

This comment has been minimized.

Show comment
Hide comment
@MarioLiebisch

MarioLiebisch Aug 25, 2015

Member

Could you try that branch? Still not 100% sure what's the reason for this, considering all examples I've found use exact comparison as well.

Member

MarioLiebisch commented Aug 25, 2015

Could you try that branch? Still not 100% sure what's the reason for this, considering all examples I've found use exact comparison as well.

@r-e-d

This comment has been minimized.

Show comment
Hide comment
@r-e-d

r-e-d Aug 26, 2015

Contributor

This fix the problem, thanks.

It may be a bug in my device because I think it makes no sense to return an event with both touch and stylus set. But this patch prevent the problem and should not affect other android device.

Contributor

r-e-d commented Aug 26, 2015

This fix the problem, thanks.

It may be a bug in my device because I think it makes no sense to return an event with both touch and stylus set. But this patch prevent the problem and should not affect other android device.

@MarioLiebisch

This comment has been minimized.

Show comment
Hide comment
@MarioLiebisch

MarioLiebisch Aug 26, 2015

Member

Okay, great. And yeah, while I'm not 100% happy with this fix, it's definitely something we could keep just to be sure for now.

Member

MarioLiebisch commented Aug 26, 2015

Okay, great. And yeah, while I'm not 100% happy with this fix, it's definitely something we could keep just to be sure for now.

@eXpl0it3r eXpl0it3r added s:accepted and removed s:undecided labels Sep 9, 2015

@eXpl0it3r eXpl0it3r added this to the 2.4 milestone Sep 9, 2015

MarioLiebisch added a commit that referenced this issue Sep 18, 2015

Android: Accept touch events from "multiple" devices
Attempt to fix issue #953, although I can't really say whether this is
indeed some driver thing. All snippets I've found use exact comparison
only (usually switches).

zsbzsb added a commit to zsbzsb/SFML that referenced this issue Sep 19, 2015

Android: Accept touch events from "multiple" devices
Attempt to fix issue SFML#953, although I can't really say whether this is
indeed some driver thing. All snippets I've found use exact comparison
only (usually switches).

@r-e-d r-e-d closed this Sep 29, 2015

@eXpl0it3r eXpl0it3r added this to Done in Android Backlog Jan 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment