Skip to content

Commit

Permalink
feat: Android v5.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziomoscon committed Aug 2, 2021
1 parent fcfb5dd commit 8e04e0b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Tested with:

The most updated branch is [feat/twilio-android-sdk-5](https://github.com/hoxfon/react-native-twilio-programmable-voice/tree/feat/twilio-android-sdk-5) which is aligned with:

- Android 5.3.1
- Android 5.4.2
- iOS 5.2.0

It contains breaking changes from `react-native-twilio-programmable-voice` v4, and it will be released as v5.
Expand Down Expand Up @@ -175,6 +175,10 @@ getSelectedAudioDevice()
selectAudioDevice(name: string)
```

#### Event deviceDidReceiveIncoming

When a call invite is received, the [SHAKEN/STIR](https://www.twilio.com/docs/voice/trusted-calling-using-shakenstir) `caller_verification` field has been added to the list of params for `deviceDidReceiveIncoming`. Values are: `verified`, `unverified`, `unknown`.

## ICE

See https://www.twilio.com/docs/stun-turn
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ dependencies {

implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.twilio:audioswitch:1.1.2'
implementation 'com.twilio:voice-android:5.3.1'
implementation 'com.twilio:voice-android:5.4.2'
implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation 'com.facebook.react:react-native:+'
implementation 'com.google.firebase:firebase-messaging:19.0.+'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ public class Constants {
public static final String CALL_INVITE_KEY = "callInvite";
public static final String CALL_STATE_CONNECTED = Call.State.CONNECTED.toString();
public static final String SELECTED_AUDIO_DEVICE = "selected_audio_device";
public static final String CALLER_VERIFICATION_STATUS = "caller_verification";
public static final String CALLER_VERIFICATION_VERIFIED = "verified";
public static final String CALLER_VERIFICATION_UNVERIFIED = "unverified";
public static final String CALLER_VERIFICATION_UNKNOWN = "unknown";
}
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,14 @@ private void handleCallInviteNotification() {
params.putString(Constants.CALL_SID, activeCallInvite.getCallSid());
params.putString(Constants.CALL_FROM, activeCallInvite.getFrom());
params.putString(Constants.CALL_TO, activeCallInvite.getTo());
String verificationStatus = Constants.CALLER_VERIFICATION_UNKNOWN;
if (activeCallInvite.getCallerInfo().isVerified() != null) {
verificationStatus = activeCallInvite.getCallerInfo().isVerified() == true
? Constants.CALLER_VERIFICATION_VERIFIED
: Constants.CALLER_VERIFICATION_UNVERIFIED
;
}
params.putString(Constants.CALLER_VERIFICATION_STATUS, verificationStatus);
eventManager.sendEvent(EVENT_DEVICE_DID_RECEIVE_INCOMING, params);
}

Expand Down

0 comments on commit 8e04e0b

Please sign in to comment.