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

Fix Android Vibration enable condition #108

Merged
merged 3 commits into from
Aug 15, 2023
Merged

Conversation

Lavegaa
Copy link
Contributor

@Lavegaa Lavegaa commented Aug 7, 2023

Problem

There seems to be a problem with the ignoreAndroidSystemSettings option. Many people have no haptic response when the ignoreAndroidSystemSettings option is set to false, so they are using it with it set to true. (#97)

The previously used Settings.System.HAPTIC_FEEDBACK_ENABLED option has been deprecated and no longer returns the enabled state of haptic. Because it simply returns a string called haptic_feedback_enabled, hapticEnabledAndroidSystemSettings always has to be 0.
https://developer.android.com/reference/android/provider/Settings.System#HAPTIC_FEEDBACK_ENABLED

Suggestion

So I propose a new vibration enable condition.

The first is when the device has a vibration function.

The second is when the user turns on the sound of the device or puts it in vibrate mode.

When the above two conditions are satisfied, it can be considered that the user has enabled haptic.

@mkuczera mkuczera merged commit 52bc434 into mkuczera:master Aug 15, 2023
@mkuczera
Copy link
Owner

Fixed in 2.1.0, currently in beta to test it. Thanks for your PR :)

@Pahkoo
Copy link

Pahkoo commented Jun 13, 2024

Hello, may I ask if I have disabled the system's tactile feedback in my phone system or can it still generate vibrations

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

Successfully merging this pull request may close these issues.

3 participants