B
B
Ben L2021-08-10 09:23:31
Mobile development
Ben L, 2021-08-10 09:23:31

As in mob. application / browsers to make the device vibrate with a certain intensity?

There is an app for mobile. (React Native), in which there is a button, by pressing which you need to make the phone vibrate with a certain intensity (values ​​​​are in%).
As far as I understand, for phones (as well as in browsers), functions that activate vibrations can be passed an array that defines the vibration interval and the pause interval.
To simulate "intensity" I consider that the lower the intensity, the shorter the vibration time and vice versa (and the pause time is always 0).

var v = [25, 0, 25, 0, 25, 0, .., 40, 0, 40, 0, ...];

Are there other solutions to this problem?
On which devices can I perform vibrations by intensity (if any)?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question