forked from mirrors/linphone-iphone
LinphoneAppDelegate.m: automatically start call when answering from within notification in iOS9+
This commit is contained in:
parent
7cd395e9e2
commit
6bae5dab90
2 changed files with 13 additions and 1 deletions
|
|
@ -22,6 +22,7 @@ Group changes to describe their impact on the project, as follows:
|
|||
- Fix invalid photo rotation when using Camera for avatars
|
||||
- Parse user input as SIP address or phone number depending on default account settings: if "substitute + by country code" is set,
|
||||
consider inputs to be phone numbers, otherwise SIP addresses.
|
||||
- Automatically start call when answering from within notification in iOS9+
|
||||
|
||||
## [3.12.1] - 2016-02-19
|
||||
|
||||
|
|
|
|||
|
|
@ -465,7 +465,17 @@
|
|||
withResponseInfo:(NSDictionary *)responseInfo
|
||||
completionHandler:(void (^)())completionHandler {
|
||||
|
||||
if ([notification.category isEqualToString:@"incoming_msg"] && [identifier isEqualToString:@"reply_inline"]) {
|
||||
if ([notification.category isEqualToString:@"incoming_call"]) {
|
||||
if ([identifier isEqualToString:@"answer"]) {
|
||||
// use the standard handler
|
||||
[self application:application didReceiveLocalNotification:notification];
|
||||
} else if ([identifier isEqualToString:@"decline"]) {
|
||||
LinphoneCall *call = linphone_core_get_current_call(LC);
|
||||
if (call)
|
||||
linphone_core_decline_call(LC, call, LinphoneReasonDeclined);
|
||||
}
|
||||
} else if ([notification.category isEqualToString:@"incoming_msg"] &&
|
||||
[identifier isEqualToString:@"reply_inline"]) {
|
||||
LinphoneCore *lc = [LinphoneManager getLc];
|
||||
NSString *replyText = [responseInfo objectForKey:UIUserNotificationActionResponseTypedTextKey];
|
||||
NSString *from = [notification.userInfo objectForKey:@"from_addr"];
|
||||
|
|
@ -477,6 +487,7 @@
|
|||
[PhoneMainView.instance updateApplicationBadgeNumber];
|
||||
}
|
||||
}
|
||||
completionHandler();
|
||||
}
|
||||
|
||||
- (void)application:(UIApplication *)application
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue