Im working on the iOS version of my phone navigation app. My app tracks the location of users around the walking route using GPS and alerts the user using audio (navigator.notification.beep) and tactile (navigator.notification.vibrate) feedback when they reach the location where new instructions follow.
When my application runs in the foreground, both the sound signal and the vibration light when it reaches a geographical position, but when the application pauses in the background, either by pressing the power button to turn off the screen or by pressing the house to return to the springboard, only vibration works - no beep is heard. I added debug, so I can see in the log file that the application calls navigator.notification.beep (), in the background, but there is no beep. Ive tested my application on iPhone 4S running iOS 6.3.1 and iPad 2 with iOS 5.1.1. Apparently, the iPad doesn't vibrate, but the beep sounds when the app is in the foreground, but not in the background.
- My application uses Phonegap 2.5.0
- Im using the latest Xcode v4.6.2 with the latest SDK for iOS 6.3.1
- Im using beep.wav in the root directory / www
- My .plist applications install "UIBackgroundModes" from "location" and "audio"
The config.xml file contains the following parameters:
<plugin name = Value "Notification" = "CDVNotification" />
<plugin name = Value "Media" = "CDVSound" />
<preference name = "MediaPlaybackRequiresUserAction" value = "false" />
<preference name = "AllowInlineMediaPlayback" value = "true" />
Any suggestions on how to fix this will be most valuable :-)
source share