Play vibration sound on incoming message

This commit is contained in:
Guillaume BIENKOWSKI 2014-05-23 16:23:01 +02:00
parent ca5c5c5d8e
commit 8b8d954024
3 changed files with 3 additions and 0 deletions

View file

@ -99,6 +99,7 @@ struct NetworkReachabilityContext {
typedef struct _LinphoneManagerSounds {
SystemSoundID call;
SystemSoundID message;
SystemSoundID vibrate;
} LinphoneManagerSounds;
@interface LinphoneManager : NSObject {

View file

@ -257,6 +257,7 @@ struct codec_name_pref_table codec_pref_table[]={
[LinphoneLogger log:LinphoneLoggerWarning format:@"Can't set \"message\" system sound"];
}
}
sounds.vibrate = kSystemSoundID_Vibrate;
logs = [[NSMutableArray alloc] init];
database = NULL;

View file

@ -603,6 +603,7 @@ static PhoneMainView* phoneMainViewInstance=nil;
|| [UIApplication sharedApplication].applicationState == UIApplicationStateActive) {
if(![self removeInhibitedEvent:kLinphoneTextReceived]) {
AudioServicesPlaySystemSound([LinphoneManager instance].sounds.message);
AudioServicesPlaySystemSound([LinphoneManager instance].sounds.vibrate);
}
}
}