You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to call any of the four vibration functions from the haptics (@tauri-apps/plugin-haptics) plugin does nothing. No errors are returned nor sent in the device logs.
Using:
haptics version ~2
@tauri-apps/api ^2.0.3
Android 15
The text was updated successfully, but these errors were encountered:
Do you have the Haptic Feedback OS setting disabled? The APIs are fairly sensitive to that apparently. A short summary of the linked discord messages:
With haptic feedback disabled:
vibrate() only works with values (those are in miliseconds btw) above 1000. So 1001 vibrates, 1000 and below doesn't
changing it to the waveform api, using the workaround mentioned below, should make it work too ig
impact and selection does nothing
notification (warning) does vibrate
The difference is that the vibration waveform of notification is of length 4, while the other 2 use a length 2 array. If i make all of them use length 4 by appending 0 values (meaning amplitude 0, timing 0) they also start to work
With haptic feedback enabled:
vibrate() works with values below 1000
impact and selection work without the workaround
notification still works
if you could confirm this behavior on your end that would be much appreciated - Edit: Don't forget to enable the haptics apis in the capabilities file. Since i forgot to push the Guide this seems to be a common mistake
Now the question is how to solve this.
Is this just something that should be documented?
Or should we add the workarounds and make the apis work regardless of the user's settings?
If it matters, i stole the timings/amplitudes from other projects, mainly the capacitor plugin.
Attempting to call any of the four vibration functions from the haptics (@tauri-apps/plugin-haptics) plugin does nothing. No errors are returned nor sent in the device logs.
Using:
~2
The text was updated successfully, but these errors were encountered: