Connectycube connects to chat server too late. (RN Voip and Call-Keep)
See original GitHub issueHello, I use voip push to wake up an application. RN call-keep works right after waking the application with Voip. However, these are happening on the native side. On the Rn side, call-keep works before I connect to the chat. As soon as the user answers the call, only the open application comes in front of him. How can we synchronize both.
- (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(PKPushType)type withCompletionHandler:(void (^)(void))completion {
// Process the received push
[RNVoipPushNotificationManager didReceiveIncomingPushWithPayload:payload forType:(NSString *)type];
NSObject* aps = payload.dictionaryPayload[@"aps"];
NSString* alert = [aps valueForKey:@"alert"];
NSLog(@"%@", alert);
NSData *webData = [alert dataUsingEncoding:NSUTF8StringEncoding];
NSError *error;
NSDictionary *jsonDic = [NSJSONSerialization JSONObjectWithData:webData options:NSJSONReadingMutableContainers error:&error];
NSLog(@"%@", jsonDic);
NSString *uuid = [jsonDic valueForKey:@"uuid"];
NSString *callerName = [jsonDic valueForKey:@"callerName"];
NSString *handle = [jsonDic valueForKey:@"handle"];
NSLog(@"%@ %@ %@", handle,callerName,uuid);
BOOL hasVideo = NO;
if ([[jsonDic valueForKey:@"hasVideo"] isEqualToString:(@"1")]) {
hasVideo = YES;
} else {
hasVideo = NO;
}
if([[UIApplication sharedApplication] applicationState] != UIApplicationStateActive)
{
[RNCallKeep reportNewIncomingCall: uuid
handle: handle
handleType: @"generic"
hasVideo: hasVideo
localizedCallerName: callerName
supportsHolding: NO
supportsDTMF: YES
supportsGrouping: NO
supportsUngrouping: NO
fromPushKit: YES
payload: nil
withCompletionHandler: completion];
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Simple guide for React Native WebRTC Video Calling (via ...
ConnectyCube Chat API is used as a signaling transport for Video Calling API, so in order to start using Video Calling API you...
Read more >Simple guide for React Native Chat (via ConnectyCube SDK + ...
ConnectyCube Chat (messaging) API is built on top of Real-time(XMPP) protocol. ... The SDK reconnects automatically when connection to Chat server is lost....
Read more >Push notifications - ConnectyCube
Push Notifications. Push Notifications provide a way to deliver some information to user while he is not using your app actively.
Read more >video calling | ConnectyCube
ConnectyCube helps you implement real-time chat, video chat, push notifications and user authorization to any app with ease - no server side implementation ......
Read more >Push notifications - ConnectyCube
Push Notifications provide a way to deliver some information to users while they are not using your app actively. The following use cases...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@meosieudang @CMLCNL I think the best way will be to implement it on our side an integrate in P2P code sample. Will try to dod it this week and share
Closed due to inactivity. Please create a new issue if needed.