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

'generic' handleType does not trigger an event on iOS Recent's (call log) row click

Open aevaldas opened this issue 4 years ago • 4 comments

Bug report

  • [ ] I've checked the example to reproduce the issue. Can't check it, receiving this error: https://github.com/react-native-webrtc/react-native-callkeep/issues/282

  • Reproduced on:

  • [ ] Android

  • [x] iOS

Description

generic handleType does not work as it does with phone handleType.

Steps to Reproduce

  • [ ] Run RNCallKeep.startCall('4692135d-dcbc-4a7f-aec6-ab383cd62b16', 'whatever handle you like', 'Test name', 'generic');
  • [ ] End call.
  • [ ] Go to iOS Recents (call log)
  • [ ] Click on 'Test name' row

Expected behaviour App is opened and didReceiveStartCallAction event is triggered.

Actual behaviour Nothing happens

Versions

- Callkeep: 4.0.1
- React Native: 0.63.4
- iOS: 14.3
- Phone model: iPhone XS

Logs

No output has been provided after the click action.

aevaldas avatar Jan 16 '21 14:01 aevaldas

A temporary "hack" for that is to use phone instead of generic:

RNCallKeep.startCall('4692135d-dcbc-4a7f-aec6-ab383cd62b16', 'whatever handle you like', 'Test name', 'phone');

aevaldas avatar Jan 16 '21 17:01 aevaldas

Work-around for one who need this function.

In node_modules/react-native-callkeep/ios/RNCallKeep/RNCallKeep.m

  • Add supportedHandleTypes to CXProviderConfiguration
+ (CXProviderConfiguration *)getProviderConfiguration:(NSDictionary*)settings
{
...
if(settings[@"handleType"]){
        int _handleType = [RNCallKeep getHandleType:settings[@"handleType"]];
        providerConfiguration.supportedHandleTypes = [NSSet setWithObjects:[NSNumber numberWithInteger:_handleType], nil];
    }else{
        providerConfiguration.supportedHandleTypes = [NSSet setWithObjects:[NSNumber numberWithInteger:CXHandleTypeGeneric],[NSNumber numberWithInteger:CXHandleTypePhoneNumber], nil];
    }
...
}

longndmta avatar Mar 24 '21 13:03 longndmta

I can confirm this is working when you set type generic. But is there a way how to detect is it a video or audio call when clicked in phone recents?

didReceiveStartCallAction doesn't have any info on that... also name is always undefined, but I don't care about the name. :)

dackom avatar Dec 19 '21 12:12 dackom

Hello everyone! I think this issue is not relevant anymore since RNCallKeep supports the array of handle types out-the-box now - see https://github.com/react-native-webrtc/react-native-callkeep/blob/cd36ba0ce0a3f71424adfea0ae621cbf218472f1/ios/RNCallKeep/RNCallKeep.m#L865

(cc @manuquentin)

Hesowcharov avatar Jul 18 '22 16:07 Hesowcharov