Fix Android Vibration enable condition #108
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
There seems to be a problem with the
ignoreAndroidSystemSettings
option. Many people have no haptic response when theignoreAndroidSystemSettings
option is set tofalse
, so they are using it with it set totrue
. (#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 calledhaptic_feedback_enabled
, hapticEnabledAndroidSystemSettings always has to be0
.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.