Skip to content

Commit a39e3fe

Browse files
committed
Prepare v3 release
1 parent 33195cf commit a39e3fe

File tree

6 files changed

+82
-11
lines changed

6 files changed

+82
-11
lines changed

MIGRATION_v2_v3.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
```

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@ RNCallKeep.setup(options);
9090
### setAvailable
9191
_This feature is available only on Android._
9292

93-
Tell _ConnectionService_ that the device is ready to make outgoing calls.
93+
Tell _ConnectionService_ that the device is ready to make outgoing calls via the native Phone app.
9494
If not the user will be stuck in the build UI screen without any actions.
95-
Eg: Call it with `false` when disconnected from the sip client, when your token expires ...
95+
Eg: Call it with `false` when disconnected from the sip client, when your token expires, when your user log out ...
96+
Eg: When your used log out (or the connection to your server is broken, etc..), you have to call `setAvailable(false)` so CallKeep will refuse the call and your user will not be stuck in the native UI.
9697

9798
```js
9899
RNCallKeep.setAvailable(true);

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"react-dom": "^16.8.6",
1212
"react-native": "0.59.8",
1313
"react-native-background-timer": "^2.1.1",
14-
"react-native-callkeep": "sangoma/react-native-callkeep",
14+
"react-native-callkeep": "https://github.com/react-native-webrtc/react-native-callkeep",
1515
"react-native-device-info": "^2.3.2",
1616
"react-native-gesture-handler": "~1.3.0",
1717
"react-native-reanimated": "~1.1.0",

example/yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4132,9 +4132,9 @@ react-native-branch@~3.0.1:
41324132
resolved "https://registry.yarnpkg.com/react-native-branch/-/react-native-branch-3.0.1.tgz#5b07b61cbd290168cd3c3662e017ebe0f356d2ca"
41334133
integrity sha512-vbcYxPZlpF5f39GAEUF8kuGQqCNeD3E6zEdvtOq8oCGZunHXlWlKgAS6dgBKCvsHvXgHuMtpvs39VgOp8DaKig==
41344134

4135-
react-native-callkeep@sangoma/react-native-callkeep:
4135+
"react-native-callkeep@https://github.com/react-native-webrtc/react-native-callkeep":
41364136
version "3.0.0"
4137-
resolved "https://codeload.github.com/sangoma/react-native-callkeep/tar.gz/7b9c1cc6bb461b0787d7a7bac5e7e362bc6ceb66"
4137+
resolved "https://github.com/react-native-webrtc/react-native-callkeep#46b9a488f737a002d73327847a8d8190f171754a"
41384138

41394139
react-native-device-info@^2.3.2:
41404140
version "2.3.2"

ios/RNCallKeep.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
isa = PBXProject;
9393
attributes = {
9494
LastUpgradeCheck = 0810;
95-
ORGANIZATIONNAME = "Wazo";
95+
ORGANIZATIONNAME = "react-native-webrtc";
9696
TargetAttributes = {
9797
234528911E0B88C700D1A033 = {
9898
CreatedOnToolsVersion = 8.1;

package.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,27 @@
66
"scripts": {},
77
"repository": {
88
"type": "git",
9-
"url": "git+https://github.com/wazo-pbx/react-native-callkeep.git"
9+
"url": "git+https://github.com/react-native-webrtc/react-native-callkeep.git"
1010
},
11-
"author": "Wazo (http://wazo.io)",
11+
"author": "Check AUTHORS file",
1212
"maintainers": [
1313
"Wazo Team <[email protected]> (https://github.com/wazo-pbx)"
1414
],
1515
"contributors": [
16-
"Wazo Team <[email protected]> (https://github.com/wazo-pbx)"
16+
"Wazo Team <[email protected]> (https://github.com/wazo-pbx)",
17+
"Dan Jenkins <[email protected]>",
18+
"Kyle Kurz <[email protected]>",
19+
"bhuangy <[email protected]>",
20+
"Chevon Christie",
21+
"Linus Unnebäck <[email protected]>",
22+
"Geraint White <[email protected]>",
23+
"Samuel Bégin"
1724
],
1825
"license": "ISC",
1926
"bugs": {
20-
"url": "https://github.com/wazo-pbx/react-native-callkeep/issues"
27+
"url": "https://github.com/react-native-webrtc/react-native-callkeep/issues"
2128
},
22-
"homepage": "https://github.com/wazo-pbx/react-native-callkeep#readme",
29+
"homepage": "https://github.com/react-native-webrtc/react-native-callkeep#readme",
2330
"typings": "./index.d.ts",
2431
"peerDependencies": {
2532
"react-native": ">=0.40.0"

0 commit comments

Comments
 (0)