views:

117

answers:

1

Hi,

I'm currently working on an IPhone App that should make the phone vibrate if a special event occurs.

The checks to trigger the alert is done in a thread.

Unfortunately the phone won't vibrate if I call

 AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

from inside the thread. (It works fine if I call this in my "viewDidAppear" method).

I even tried to do a callback from inside the thead like this:

 inside Thread:
 [self performSelectorOnMainThread:@selector(doAlarm) 
                                               withObject:nil 
                                            waitUntilDone:true];    

 -(void)doAlarm {
   AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);            
 }

which has the same result: No vibration on the phone.

How do I make the phone vibrate from inside a thread ??

Thanks in advance

A: 

Got it !

There were a Microphone Listener active which caused the problem.

Steblo