Vibrate command only works when phone is set to silent?
I'm using the AudioServicesPlaySystemSound (kS开发者_如何学JAVAystemSoundID_Vibrate
) to vibrate the phone but it only works when the phone is on silent. Any thoughts on why this would be?
I use this in my own app (small difference as you will see), and it works all the time. Make sure not to call if the device has no vibrate though. It won't crash, but my app reviewer complained.
AudioServicesPlayAlertSound(kSystemSoundID_Vibrate);
I know this question is old, but for any future people, my problem was that I had the vibrate switch to "off" when my phone isn't on silent. You can change this in Settings > Sounds.
精彩评论