tags:

views:

31

answers:

1

Hi all,

i knw this wat we use for vibration

#import <AudioToolbox/AudioToolbox.h>

AudioServicesPlaySystemSound (kSystemSoundID_Vibrate);

but how to stop vibrating? i mean i want a switch through with i want to activate or deactivate vibration.

HOw to do dat???

regards

+2  A: 

When you use AudioServicesPlaySystemSound() there's no way to know when the sound has stopped playing. For a vibration, I believe it's a fixed length action and I don't think you can stop it in the middle of its playing.

lucius
I am not talking about stoping vibration, while running.i want provide an option to stop or to play vibration during the app/...
shishir.bobby
Then you need to add a setting and chose wether or not to play the vibration according to that setting.
Emil