Making an iPhone vibrate requires nothing more than a simple call to Audio Services. Deciding on when your application should buzz is a different matter. The code for producing that short buzz effect is this:
AudioServicesPlaySystemSound (kSystemSoundID_Vibrate);
For this to run, you must include the Audio Toolbox headers and compile your application with the AudioToolbox framework.
Although the underlying Core Telephony framework offers subtle control over vibration pattern, duration and intensity, the Audio Services API does not. It offers a single buzz for a set duration. Your entire tactile vocabulary, therefore, is limited to this one call.
With one item to call upon, numerous apps have used it as a kind of blunt hammer for feedback. If your piece moves out of bounds, buzz. If a fish comes over to say hello and nibble your finger, buzz. If you swing your light saber, buzz.
It wouldn't be quite so bad if all the buzzes didn't feel exactly the same, if there was some programmatic way to differentiate that kind of feedback but in the current SDK, one size has to fit all. Access to more discrete levels of vibration control are off limits for App Store items and experiments such as haptic feedback for the keyboard have had very little space to explore due to this.
What's more is that a lot of these games and utilities don't really need a tactile component at least in its current inflexible incarnation and, after a while, the vibration distracts from rather than adds to the experience. I'd love to see an option to disable the vibrate feature for many App Store offerings.
In the end, I'd prefer if vibration was available with a greater feature set but that it was applied to real world uses with a lighter touch. I trust the developer community would be able to handle a more complicated API system for vibrations, just as they've managed to work with the rather fussy Audio Queues. Vibrations, like sounds, like images, are a way that a platform can express itself to the user. The iPhone would benefit from presenting a more capable and rich interface.
It appears that around the turn of the new year a blacklist on vibration-specific applications has been lifted and this may be a good sign for the possibility of vibration aspects of the SDK becoming fair game.
Last year around November I came up with the idea of a companion product for my brainwave entrainment application MindPulse but after googling around a bit decided that it would be rejected by Apple because it focused on using the vibration extensively and I had seen several other vibration-centric apps that had been rejected on the basis of excessive battery use.
I was surprised to find that in December one such app was suddenly allowed through, and followed suit in releasing my app BodyPulse.
For those of us with applications based around vibration, it would be very good news to be given more control, and it would definitely open the door for new and interesting applications down the road.
Hi Gullickson,
my requirement is like i want to vibrate the phone if the system time matches with the time that i have provided in the application, and my application is not running , now the iphone is in normal state, i want to raise an alert and vibrate the phone when the time matches and on clicking of the alerts ok button, the application has to be launched.
if you help me out in this scenario it would be great.
thank you,
Lakshmikanth
Then, VERY IMPORTANT, be sure to click Add All. A window will appear creating the three config files that point to the actual clip art.
Försäljning