Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Voice Android SDK 5.3.0 #346

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ dependencies {
testImplementation 'junit:junit:4.12'

implementation 'com.twilio:audioswitch:0.1.3'
implementation 'com.twilio:voice-android:5.2.0'
implementation 'com.twilio:voice-android:5.3.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
Expand Down
23 changes: 23 additions & 0 deletions app/src/main/java/com/twilio/voice/quickstart/VoiceActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Set;
import java.util.List;
import java.util.Locale;

Expand Down Expand Up @@ -277,6 +278,28 @@ public void onDisconnected(@NonNull Call call, CallException error) {
}
resetUI();
}
/*
* currentWarnings: existing quality warnings that have not been cleared yet
* previousWarnings: last set of warnings prior to receiving this callback
*
* Example:
* - currentWarnings: { A, B }
* - previousWarnings: { B, C }
*
* Newly raised warnings = currentWarnings - intersection = { A }
* Newly cleared warnings = previousWarnings - intersection = { C }
*/
public void onCallQualityWarningsChanged(@NonNull Call call,
@NonNull Set<Call.CallQualityWarning> currentWarnings,
@NonNull Set<Call.CallQualityWarning> previousWarnings) {
currentWarnings.retainAll(previousWarnings);
previousWarnings.removeAll(currentWarnings);
String message = String.format(
Locale.US,
"Newly raised warnings: " + currentWarnings + " Clear warnings " + previousWarnings);
Log.e(TAG, message);
Snackbar.make(coordinatorLayout, message, Snackbar.LENGTH_LONG).show();
}
};
}

Expand Down
2 changes: 1 addition & 1 deletion exampleCustomAudioDevice/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ android {
dependencies {
testImplementation 'junit:junit:4.12'

implementation 'com.twilio:voice-android:5.2.0'
implementation 'com.twilio:voice-android:5.3.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
Expand Down