Currently only iPhone supports the vibrations how can I check if my device supports vibrations before calling the vibration function.
Currently only iPhone supports the vibrations how can I check if my device supports
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The iOS sdk has two functions that would vibrate the iPhone. But Vibration hardware is present only on iPhones. So how will you alert your user who uses the app on iPad or iPod touches? Clearly, checking the model is not the way to go. There are two seemingly similar functions that take a parameter kSystemSoundID_Vibrate
Both the functions vibrate the iPhone. But when you use the first function on devices that don’t support vibration, it plays a beep sound. The second function on the other hand does nothing on unsupported devices.