Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Windows Phone and PhoneGap; The Beep Sound

DZone's Guide to

Windows Phone and PhoneGap; The Beep Sound

· Mobile Zone
Free Resource

Launching an app doesn’t need to be daunting. Whether you’re just getting started or need a refresher on mobile app testing best practices, this guide is your resource! Brought to you in partnership with Perfecto

Well , this is something simple which can be done in 1 line of code if you are using PhoneGap for Windows Phone .

If you are using Windows Phone SDK and developing App in Silverlight or XNA , you might end up using the SoundEffect class to load the sound from the stram and play it for a beep sound .

The PhoneGap provides the method navigator.notification.beep that plays the beep sound .

The methods navigator.notification.beep takes 1 parameter i.e the number of times the beep sound should be made

navigator.notification.beep(3) which makes 3 beep sound .

function Button1_onclick()
{
navigator.notification.beep(100);
}

How is this done in PhoneGap where in one needs to load the file in silverlight or XNA ?

Well , looks like a file to load the Beep sound is loaded internally in PhoneGp library to achieve this …

Keep up with the latest DevTest Jargon with the latest Mobile DevTest Dictionary. Brought to you in partnership with Perfecto.

Topics:

Published at DZone with permission of Senthil Kumar, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}