notification.beep( )
...
Code Block |
---|
|
navigator.notification.beep(times); |
The device will play a beep sound.
Parameters #
- times: The number of times to repeat the beep (Number)
Supported Platforms #
- Android
- BlackBerry WebWorks (OS 5.0 and higher)
- iOS (OS 4.0 and higher)
Examples #
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
navigator.notification.beep(2); |
Info |
---|
|
- Ignores the beep count argument.
- There is no native beep API for iPhone.
- PhoneGap implements beep by playing an audio file via the media API.
- The user must provide a file with the desired beep tone.
- This file must be less than 30 seconds long, located in the www/ root, and must be named beep.wav
|
Info |
---|
|
- Android plays the default "Notification ringtone" specified under the "Settings/Sound & Display" panel.
|