Skip to content

Commit d6c90dc

Browse files
authored
Merge pull request #83 from react-native-webrtc/release_v3
Prepare v3 release
2 parents 46b9a48 + 2fef44b commit d6c90dc

File tree

7 files changed

+84
-17
lines changed

7 files changed

+84
-17
lines changed

AUTHORS

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
CallKeep is a fork of react-native-callkit by ianlin.
2-
Since it only target iOS devices, we created CallKeep to target both Android and iOS.
2+
Since react-native-callkit only targets iOS devices, we created react-native-callkeep to target both Android and iOS.
33

44
Ian Yu-Hsun Lin <ianyuhsunlin@gmail.com>
55
Wazo Communication inc. <dev@wazo.io>
6+
Dan Jenkins <dan@nimbleape.com>
7+
Kyle Kurz <kyle@doublekaudio.com>
8+
bhuangy <brandon.sh.huang@gmail.com>
9+
Chevon Christie
10+
Linus Unnebäck <linus@folkdatorn.se>
11+
Geraint White <mail@geraintwhite.co.uk>
12+
Samuel Bégin

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: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,16 @@
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)",
12-
"maintainers": [
13-
"Wazo Team <dev@wazo.io> (https://github.com/wazo-pbx)"
14-
],
15-
"contributors": [
16-
"Wazo Team <dev@wazo.io> (https://github.com/wazo-pbx)"
17-
],
11+
"author": "See AUTHORS file",
12+
"maintainers": ["See AUTHORS file"],
13+
"contributors": ["See AUTHORS file"],
1814
"license": "ISC",
1915
"bugs": {
20-
"url": "https://github.com/wazo-pbx/react-native-callkeep/issues"
16+
"url": "https://github.com/react-native-webrtc/react-native-callkeep/issues"
2117
},
22-
"homepage": "https://github.com/wazo-pbx/react-native-callkeep#readme",
18+
"homepage": "https://github.com/react-native-webrtc/react-native-callkeep#readme",
2319
"typings": "./index.d.ts",
2420
"peerDependencies": {
2521
"react-native": ">=0.40.0"

0 commit comments

Comments
 (0)