I am trying to implement solution that has been described before, here is the link
http://stackoverflow.com/questions/2718837/how-to-run-vibrate-continuously-in-iphone
Everything works fine except when I am trying to retrieve bool property iShouldKeepBuzzing which should say when to stop looping vibration I still get value 0, so it is not actually looping vibration as expected. I guess the way I am trying to reach the property is wrong because assigning is definitely 1, but still getting 0.
bool iShouldKeepBuzzing;
@property (readwrite) BOOL iShouldKeepBuzzing;
void MyAudioServicesSystemSoundCompletionProc (SystemSoundID ssID, void *clientData) {
newBinController *controller = (newBinController *) clientData;
NSLog(@"Inicjujem vibrator %i", controller.iShouldKeepBuzzing);
if (controller.iShouldKeepBuzzing)
{
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
} else
{
//Unregister, so we don't get called again...
AudioServicesRemoveSystemSoundCompletion(kSystemSoundID_Vibrate);
}
}
any suggestion regarding this issue will be appreciated.
tnx