|
| 1 | +# Migration from CallKeep v2 to v3 |
| 2 | + |
| 3 | +Thanks to the Sangoma team, CallKeep now allows multi calls through native UI. |
| 4 | +Here's how to upgrade your codebase for this new version. |
| 5 | + |
| 6 | +## Common |
| 7 | + |
| 8 | +### setup |
| 9 | + |
| 10 | +Since the v3, you have to call `setup` each time your application is launched. |
| 11 | + |
| 12 | +### didPerformDTMFAction |
| 13 | + |
| 14 | +`didPerformDTMFAction` now take `digits` instead of `dtmf` as key of its argument. |
| 15 | + |
| 16 | +### didPerformSetMutedCallAction |
| 17 | + |
| 18 | +`didPerformSetMutedCallAction` now returns an object as argument with `{ muted, callUUID }`. |
| 19 | + |
| 20 | +### startCall |
| 21 | + |
| 22 | +`startCall` takes 3 arguments now : `uuid`, `handle`, `contactIdentifier`. |
| 23 | + |
| 24 | +### Call uuids |
| 25 | + |
| 26 | +`setCurrentCallActive`, `endCall`, now takes a `callUuid` argument. |
| 27 | + |
| 28 | +Events are also with an `callUUID` in the argument object. |
| 29 | + |
| 30 | +### ⚠️ Lower case your uuids |
| 31 | + |
| 32 | +There is no more check on the uuid case, everything is returned to your application in lower case. |
| 33 | +So you have to send lower cased uuid to allow matching your calls. |
| 34 | + |
| 35 | +### News methods |
| 36 | + |
| 37 | +There is now new method like [updateDisplay]() |
| 38 | + |
| 39 | +## Android |
| 40 | + |
| 41 | +### Update `MainActivity.java` |
| 42 | + |
| 43 | +- Add new imports |
| 44 | + |
| 45 | +```diff |
| 46 | ++ import android.support.annotation.NonNull; |
| 47 | ++ import android.support.annotation.Nullable; |
| 48 | +``` |
| 49 | + |
| 50 | +- Update `onRequestPermissionsResult` method: |
| 51 | + |
| 52 | +```java |
| 53 | +// Permission results |
| 54 | +@Override |
| 55 | +public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { |
| 56 | + super.onRequestPermissionsResult(requestCode, permissions, grantResults); |
| 57 | + switch (requestCode) { |
| 58 | + case RNCallKeepModule.REQUEST_READ_PHONE_STATE: |
| 59 | + RNCallKeepModule.onRequestPermissionsResult(requestCode, permissions, grantResults); |
| 60 | + break; |
| 61 | + } |
| 62 | +} |
| 63 | +``` |
0 commit comments