Update the badge count to reflect ongoing calls.

This is useful in the case an incoming call is received but Linphone is
in the background.
Also disable ringing once the application gets in the foreground.
This commit is contained in:
Guillaume BIENKOWSKI 2013-11-18 12:12:08 +01:00
parent 03dfd7fc7b
commit 8c6e96eb80
2 changed files with 4 additions and 0 deletions

View file

@ -111,6 +111,9 @@
instance->currentCallContextBeforeGoingBackground.call = 0;
} else {
[[PhoneMainView instance ] displayIncomingCall:call];
// in this case, the ringing sound comes from the notification.
// To stop it we have to do the iOS7 ring fix...
[self fixRing];
}
}
}

View file

@ -345,6 +345,7 @@ static PhoneMainView* phoneMainViewInstance=nil;
int count = 0;
count += linphone_core_get_missed_calls_count([LinphoneManager getLc]);
count += [ChatModel unreadMessages];
count += linphone_core_get_calls_nb([LinphoneManager getLc]);
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:count];
}