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 preview3. #196

Merged
merged 1 commit into from
Sep 6, 2018
Merged

Use preview3. #196

merged 1 commit into from
Sep 6, 2018

Conversation

kbagchiGWC
Copy link
Contributor

https://www.twilio.com/docs/voice/voip-sdk/android/changelog#300-preview3

3.0.0-preview3

Enhancements

API Changes:
  • Nullability annotations have been added. Methods that expect @NonNull parameters throw NullPointerException. Methods that validate parameters for a specified input throw IllegalStateException if invalid.
  • Moved CallState to Call.State
  • Provide a stateless mechanism for processing push messages related to call invites and call invite cancellations. This API no longer raises errors when processing invalid messages, instead a boolean value is returned when handleMessage(context, data) is called. The boolean value is true when the provided data results in a CallInvite or CancelledCallInvite. If handleMessage(context, data) returns false it means the data provided was not a Twilio Voice push message. The CallInvite has an accept() and reject() method. While the CancelledCallInvite simply provides the to, from, and callSid fields also available in the CallInvite. The method getCallSid() can be used to associate a CallInvite with a CancelledCallInvite.
    • Migrated the API CallInvite to CallInvite and CancelledCallInvite.
       // Processing push messages in 2.X
       handleMessage(context, data, new MessageListener() {
           @Override
           void onCallInvite(CallInvite callInvite) {
                 // Check state and process invite
                 if (callInvite.getState().equals(PENDING)) {
                     // Show notification to answer or reject call
                 } else if(callInvite.getState().equals(CANCELLED)) {
                     // Hide notification
                 }
           }

           @Override
           void onError(MessageException messageException) {
               // Invalid data was provided
           }
       });

       // Processing push messages in 3.X
       boolean handled = handleMessage(context, data, new MessageListener() {
           @Override
           void onCallInvite(CallInvite callInvite) {
               // Show notification to answer or reject call
           }

           @Override
           void onCancelledCallInvite(CancelledCallInvite callInvite) {
               // Hide notification
           }
       });

       if(!handled) {
           // This message is not a Twilio voice push message
       }
  • Introduced call.getStats() method that returns a list of StatsReport with metrics for all the audio tracks in a call.
	call.getStats(new StatsListener() {
        @Override
        public void onStats(@NonNull List<StatsReport> statsReports) {
            // Process statsReports
        }
	});

@kbagchiGWC kbagchiGWC requested a review from idelgado September 5, 2018 23:34
@kbagchiGWC kbagchiGWC merged commit ea838fe into twilio:3.x Sep 6, 2018
@kbagchiGWC kbagchiGWC deleted the use_preview3 branch September 6, 2018 06:26
aaalaniz pushed a commit that referenced this pull request Apr 26, 2019
* Use 3.0.0-preview1 (#192)

* Use 3.0.0-preview2 (#193)

* Use preview3. (#196)

* Migration guide (#197)

* Using 3.0.0-preview4. (#205)

Use preview4

* Use preview5. (#206)

* Updated README migration section with custom parameters support entries. (#207)

* New Features section (#212)

* Describe handleMessage callback behavior differences between 2.X and 3.X (#216)

* Use preview6. (#218)

* Implement hold functionality (#220)

* Use 3.0.0-beta1 (#223)

* Use Voice SDK 3.0.0-beta2 (#228)

* Task/update proguard rules (#229)

* Add push credential docs (#232)

* Use absolute URL so the Getting Started page resolves images (#236)

* Removed extra space (#238)

* Use Voice SDK 3.0.0-beta3 (#240)

* Use beta4 (#243)

* Update to 3.0.0-beta5 (#245)

* Consume Android Voice SDK 3.0.0-beta6 (#250)

Consume Android Voice SDK 3.0.0-beta6

* Use Voice Android SDK 3.0.0-beta7 (#252)

* Use Voice Android SDK 3.0.0-beta8 (#255)

* Moved out Migration guide and new feature sections  (#257)

* Moved out new features and migration guide sections and created new Docs files

Small updates to titles and renamed 3.x to 3.0 in some cases

* Made the "x" in "2.x" and "3.x" lower case

The "x" in "2.x" and "3.x" was inconsistent - in some cases lower case and in others upper case. This commit changes the "X" to lower case

* Use Voice Android SDK 3.0.0-beta9 (#258)

* Use Voice Android SDK 3.0.0-beta10 (#259)

* Improve param docs (#261)

* Readme update with audio settings guidance (#260)

* Use Voice Android SDK 3.0.0-beta10

* Updated README with troubleshooting audio section. Upadted VoiceActivity - requestAudioFocus now takes AudioManager.OnAudioFocusChangeListener instead of null listener.

* Use Voice Android SDK 3.0.0-beta11 (#262)

* Use Voice SDK 3.0.0_beta12 (#264)

* Use Voice SDK 3.0.0_beta13 (#265)

* Use Voice Android SDK 3.0.0 GA version (#266)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants