Skip to content

Commit

Permalink
Merge pull request #83 from react-native-webrtc/release_v3
Browse files Browse the repository at this point in the history
Prepare v3 release
  • Loading branch information
manuquentin authored Aug 25, 2019
2 parents 46b9a48 + 2fef44b commit d6c90dc
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 17 deletions.
9 changes: 8 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
CallKeep is a fork of react-native-callkit by ianlin.
Since it only target iOS devices, we created CallKeep to target both Android and iOS.
Since react-native-callkit only targets iOS devices, we created react-native-callkeep to target both Android and iOS.

Ian Yu-Hsun Lin <[email protected]>
Wazo Communication inc. <[email protected]>
Dan Jenkins <[email protected]>
Kyle Kurz <[email protected]>
bhuangy <[email protected]>
Chevon Christie
Linus Unnebäck <[email protected]>
Geraint White <[email protected]>
Samuel Bégin
63 changes: 63 additions & 0 deletions MIGRATION_v2_v3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Migration from CallKeep v2 to v3

Thanks to the Sangoma team, CallKeep now allows multi calls through native UI.
Here's how to upgrade your codebase for this new version.

## Common

### setup

Since the v3, you have to call `setup` each time your application is launched.

### didPerformDTMFAction

`didPerformDTMFAction` now take `digits` instead of `dtmf` as key of its argument.

### didPerformSetMutedCallAction

`didPerformSetMutedCallAction` now returns an object as argument with `{ muted, callUUID }`.

### startCall

`startCall` takes 3 arguments now : `uuid`, `handle`, `contactIdentifier`.

### Call uuids

`setCurrentCallActive`, `endCall`, now takes a `callUuid` argument.

Events are also with an `callUUID` in the argument object.

### ⚠️ Lower case your uuids

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.

### News methods

There is now new method like [updateDisplay]()

## Android

### Update `MainActivity.java`

- Add new imports

```diff
+ import android.support.annotation.NonNull;
+ import android.support.annotation.Nullable;
```

- Update `onRequestPermissionsResult` method:

```java
// 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;
}
}
```
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ RNCallKeep.setup(options);
### setAvailable
_This feature is available only on Android._

Tell _ConnectionService_ that the device is ready to make outgoing calls.
Tell _ConnectionService_ that the device is ready to make outgoing calls via the native Phone app.
If not the user will be stuck in the build UI screen without any actions.
Eg: Call it with `false` when disconnected from the sip client, when your token expires ...
Eg: Call it with `false` when disconnected from the sip client, when your token expires, when your user log out ...
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.

```js
RNCallKeep.setAvailable(true);
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"react-dom": "^16.8.6",
"react-native": "0.59.8",
"react-native-background-timer": "^2.1.1",
"react-native-callkeep": "sangoma/react-native-callkeep",
"react-native-callkeep": "https://github.com/react-native-webrtc/react-native-callkeep",
"react-native-device-info": "^2.3.2",
"react-native-gesture-handler": "~1.3.0",
"react-native-reanimated": "~1.1.0",
Expand Down
4 changes: 2 additions & 2 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4132,9 +4132,9 @@ react-native-branch@~3.0.1:
resolved "https://registry.yarnpkg.com/react-native-branch/-/react-native-branch-3.0.1.tgz#5b07b61cbd290168cd3c3662e017ebe0f356d2ca"
integrity sha512-vbcYxPZlpF5f39GAEUF8kuGQqCNeD3E6zEdvtOq8oCGZunHXlWlKgAS6dgBKCvsHvXgHuMtpvs39VgOp8DaKig==

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

react-native-device-info@^2.3.2:
version "2.3.2"
Expand Down
2 changes: 1 addition & 1 deletion ios/RNCallKeep.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0810;
ORGANIZATIONNAME = "Wazo";
ORGANIZATIONNAME = "react-native-webrtc";
TargetAttributes = {
234528911E0B88C700D1A033 = {
CreatedOnToolsVersion = 8.1;
Expand Down
16 changes: 6 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@
"scripts": {},
"repository": {
"type": "git",
"url": "git+https://github.com/wazo-pbx/react-native-callkeep.git"
"url": "git+https://github.com/react-native-webrtc/react-native-callkeep.git"
},
"author": "Wazo (http://wazo.io)",
"maintainers": [
"Wazo Team <[email protected]> (https://github.com/wazo-pbx)"
],
"contributors": [
"Wazo Team <[email protected]> (https://github.com/wazo-pbx)"
],
"author": "See AUTHORS file",
"maintainers": ["See AUTHORS file"],
"contributors": ["See AUTHORS file"],
"license": "ISC",
"bugs": {
"url": "https://github.com/wazo-pbx/react-native-callkeep/issues"
"url": "https://github.com/react-native-webrtc/react-native-callkeep/issues"
},
"homepage": "https://github.com/wazo-pbx/react-native-callkeep#readme",
"homepage": "https://github.com/react-native-webrtc/react-native-callkeep#readme",
"typings": "./index.d.ts",
"peerDependencies": {
"react-native": ">=0.40.0"
Expand Down

0 comments on commit d6c90dc

Please sign in to comment.