Kumar sonu
Kumar sonu

Reputation: 535

how to increase the vibration time in iPhone

I am using following method to vibrate the device

 AudioServicesPlaySystemSound (kSystemSoundID_Vibrate);

But this vibrate for a very shor period of time can we increase this period ?

Upvotes: 1

Views: 1955

Answers (3)

Sam Mallicoat
Sam Mallicoat

Reputation: 111

Since iOS5 allows custom vibrations, I believe that a virtual contact could be created with an arbitrary vibration pattern and an iMessage sent programmatically to that contact...messy but should work to circumvent the foolish API restriction. I can see why long vibrations are not allowed, but for hap tics it would be really helpful to have something besides the standard 400ms burst of 178Hz.

Upvotes: 3

Kyone
Kyone

Reputation: 523

You cannot change vibration duration with official APIs.

You could call AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); multiple times in a loop or using a NSTimer, but that is not recommended. It drains battery and the device could fall off the table.

By the way, Apple could reject your app if they consider you don't use the vibrate properly.

Upvotes: 3

i think there is no way to increase the vibrate time since .it wasting the power if we increase apple fixed as constant .

Upvotes: 0

Related Questions