Thanks to the Sangoma team, CallKeep now allows multi calls through native UI. Here's how to upgrade your codebase for this new version.
Since the v3, you have to call setup each time your application is launched.
didPerformDTMFAction now take digits instead of dtmf as key of its argument.
didPerformSetMutedCallAction now returns an object as argument with { muted, callUUID }.
startCall takes 3 arguments now : uuid, handle, contactIdentifier.
setCurrentCallActive, endCall, now takes a callUuid argument.
Events are also with an callUUID in the argument object.
There is no more check on the uuid case, everything is returned to your application in lower case. So you have to send lower cased uuid to allow matching your calls.
There is now new method like updateDisplay
- Add new imports
+ import android.support.annotation.NonNull;
+ import android.support.annotation.Nullable;- Update
onRequestPermissionsResultmethod:
// Permission results
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
switch (requestCode) {
case RNCallKeepModule.REQUEST_READ_PHONE_STATE:
RNCallKeepModule.onRequestPermissionsResult(requestCode, permissions, grantResults);
break;
}
}