react-native-callkeep icon indicating copy to clipboard operation
react-native-callkeep copied to clipboard

CallKeep auto close later 5 to 10 second on ios

Open nghiant96 opened this issue 4 years ago • 2 comments

I am doing push voip with callkeep. When the application is running or in the background. It works well. But when I kill it, the callkeep shows only 5 to 10 seconds then turns off by itself. Version react-native-callkeep: 4.2.0 or 4.1.0 version react-native-voip-push-notification: 3.3.0 or 3.1.0

version react-native: 0.63.4

im running on Ipad, version padOS: 14.7.1

AppDelegate.m

// --- Handle updated push credentials

  • (void)pushRegistry:(PKPushRegistry *)registry didUpdatePushCredentials:(PKPushCredentials *)credentials forType:(PKPushType)type { // Register VoIP push token (a property of PKPushCredentials) with server [RNVoipPushNotificationManager didUpdatePushCredentials:credentials forType:(NSString *)type]; }

  • (void)pushRegistry:(PKPushRegistry *)registry didInvalidatePushTokenForType:(PKPushType)type { // --- The system calls this method when a previously provided push token is no longer valid for use. No action is necessary on your part to reregister the push type. Instead, use this method to notify your server not to send push notifications using the matching push token. }

  • (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(PKPushType)type withCompletionHandler:(void (^)(void))completion { // Process the received push NSDictionary *custom = [payload.dictionaryPayload valueForKey:@"custom"]; NSLog(@"custom123123123"); NSLog(@"%@", custom); NSDictionary *a = [custom valueForKey:@"a"]; NSString *uuid = [a valueForKey:@"uuid"]; NSString *domain = [a valueForKey:@"domain"]; NSString *token = [a valueForKey:@"token"]; NSString *room = [a valueForKey:@"room"]; NSString *mobile = [a valueForKey:@"mobile"];

    [RNVoipPushNotificationManager addCompletionHandler:uuid completionHandler:completion];

    // --- Process the received push [RNVoipPushNotificationManager didReceiveIncomingPushWithPayload:payload forType:(NSString *)type];

    [RNCallKeep reportNewIncomingCall: uuid handle: mobile handleType: @"generic" hasVideo: NO localizedCallerName: room supportsHolding: YES supportsDTMF: YES supportsGrouping: YES supportsUngrouping: YES fromPushKit: YES payload: custom withCompletionHandler: completion]; } Screenshot 2021-08-24 at 11 34 30

nghiant96 avatar Aug 24 '21 04:08 nghiant96

@nghiant96 Did you fix this?

hariks789 avatar Dec 05 '21 07:12 hariks789

@nghiant96 @hariks789 Did you fix this?

florindumitru avatar May 10 '23 05:05 florindumitru