0

I'm working for my app that has to be integrated vibration on button click. I've added AudioToolBox framework to support for sound and vibration. I did try to make vibrate in my device about less than 1 sec (500ms) as per requirement but I got failed result since there were no methods to passing the value as user required. There were only two inbuilt methods available for Audio sound play and vibrate.

  • AudioServicesPlayAlertSound(kSystemSoundID_Vibrate);
  • AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

I've googled and found the function called "AudioServicesPlaySystemSoundWithVibration" but this seems implicit method and not available for the developer. it shows the error implicit declaration of function is invalid C99. Any assistance on this query would be greatly appreciated.

Sathish
  • 416
  • 1
  • 6
  • 20
  • Possible duplicate of ["AudioServicesPlaySystemSound(kSystemSoundID\_Vibrate)" choose the vibrate duration](http://stackoverflow.com/questions/22176750/audioservicesplaysystemsoundksystemsoundid-vibrate-choose-the-vibrate-durati) – Teja Nandamuri Aug 29 '16 at 15:24
  • "I got filed result since there were no methods to passing the value as user required" - what? – Kreiri Aug 29 '16 at 15:26
  • @TejaNandamuri the post you have referred above still vibrate 1 sec at the first time and keep vibrating, but my scenario required make the vibrate 500ms at very first time and no more after vibration. No possible duplicate and I'm still waiting for expert's assistance on this. – Sathish Aug 30 '16 at 08:30
  • @Kreiri sorry that was typo error. I've just edited. – Sathish Aug 30 '16 at 11:03

0 Answers0