Skip to content
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] Input overlay haptic feedback #13220

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

codokie
Copy link

@codokie codokie commented Dec 12, 2024

(I had previously opened #12970 but decided to revert the controller rumble changes as they weren't ready for merge)

Basically I added vibration when pressing the input overlay controls. This feature is disabled by default and can be enabled only if the device has a vibrator.

The vibration's intensity (duration/amplitude) and triggers (button press/release & overlay joystick) can be adjusted using the new dialog accessible via "Overlay Controls" -> "Touch Haptics".

To ensure all devices including those on Android 13+ can perceive a vibration even when haptic feedback is disabled in Android settings, I've decided to use the VibrationEffect.Composition library with automatic fallback to non-rich haptics on older devices that do not support primitive composition.

Any feedback would be appreciated, thank you for reading

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

Successfully merging this pull request may close these issues.

1 participant