All Products
Search
Document Center

SuperApp:Beep

Last Updated:Oct 25, 2024

This topic describes the JavaScript API of WVNotification. You can refer to this topic when you create HTML5 apps or Miniapps. You can use the JavaScript API of WVNotification to make the phone beep when notifications are received.

WVNotification.beep

Makes the phone beep.

Input parameters

  • [int]count-*[Optional]* The number of consecutive beeps. Default value: 1.

Callback parameters

No callback parameters exist. If the phone beeps, the success callback is invoked. Otherwise, the failure callback is invoked.

var params = {
        // The number of consecutive beeps.
        count: 3
};
window.WindVane.call('WVNotification', 'beep', params, function(e) {
        alert('success');
}, function(e) {
        alert('failure: ' + JSON.stringify(e));
});