ios - How to send signal when app in background in opentalk? -
i have implement remote notification in ios 8. in notification have 2 button?
1 ) when click on end call want send signal other device.
2) when click on accept want send signal other device.
see following screenshot better understand
when tap notification display following screen .
when open main screen working fine.
following code notification button tap buttons.
- (void)application:(uiapplication *)application handleactionwithidentifier:(nsstring *)identifier forremotenotification:(nsdictionary *)userinfo completionhandler:(void (^)())completionhandler { doctornotificationviewcontroller *doctornoti = [[doctornotificationviewcontroller alloc]initwithnibname:@"doctornotificationviewcontroller" bundle:nil]; if ([identifier isequaltostring:notificationactiononeident]) { [doctornoti btnacceptpressed:0]; } else if ([identifier isequaltostring:notificationactiontwoident]) { [doctornoti btnrejectpressed:0]; } [self.navcntrl pushviewcontroller:doctornoti animated:yes]; }
any appreciate.
you can send signal method
[otsession signalwithtype:string:connection:retryafterreconnect:error:]
and receive
[otsessiondelegate session:receivedsignaltype:fromconnection:withstring:]
update: handling background remote notification, think it's related ios more tokbox. found interesting article: https://medium.com/posts-from-emmerge/ios-push-notification-background-fetch-demystified-7090358bb66e#.3cb8p9x6n.
Comments
Post a Comment