B
B
Ben L2021-08-20 20:56:16
Tizen
Ben L, 2021-08-20 20:56:16

How to execute navigator.vibrate when app is in background?

There is a simple web application in Tizen, which is supposed to vibrate periodically.

var t = Date.now();
var textSpan = getSpan();
setInterval(function() {
    const now = Date.now();
    textSpan.innerText = now;
    if (now- t > 5e3) {
        t = now;
        navigator.vibrate([150]);
    }
}, 500);


The device (Samsung Galaxy Watch3) only vibrates when the app is open. Is it possible to make it vibrate even if the application is in the background? (I see that the text is changing, so the application is running).

I found a similar (old) question on the Internet, they said that you need to add config.xml
<tizen:settings background-support="enable" background-vibration="enable"/>

But the IDE complains that "background-vibration is not allowed to appear in element tizen:settings".

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