I have a PhoneGap app that I'm testing on webOS, Android, and iPhone. I'm using physical devices as well as emulators (the ones that come with their respective SDKs, not the PhoneGap emulator).
Part of the code uses the navigator.notification.vibrate() and navigator.notification.beep() functions.
All the physical devices I'm using either perform the behavior or ignore it if they're not capable (e.g., the iPod can't vibrate). However, the emulators behave differently.
The Android emulator kills the app whenever the beep() function is called. The iPhone emulator causes the app to hang whenever the vibrate() function is called.
Is there any way to get the emulators to ignore those function calls when they are unable to execute them? That is, is there a way to get them to degrade gracefully so I can test the app both places without having to modify the code specifically for the emulators?