There seems to be a problem with the ignoreAndroidSystemSettingsoption. Many people have no haptic response when the ignoreAndroidSystemSettingsoption is set to false, so they are using it with it set to true. (https://github.com/mkuczera/react-native-haptic-feedback/issues/97)
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
. (https://github.com/mkuczera/react-native-haptic-feedback/issues/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_ENABLEDSuggestion
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.