Azure / communication-ui-library-android

Azure Communication UI Mobile Library for Android
https://learn.microsoft.com/en-us/azure/communication-services/concepts/ui-library/ui-library-overview?pivots=platform-web
MIT License
24 stars 29 forks source link

[Calling][Feature] Rooms v1 #970

Closed pavelprystinka closed 7 months ago

pavelprystinka commented 7 months ago

Purpose

Does this introduce a breaking change?

Pull Request Type

What kind of change does this Pull Request introduce?

Pull Request Checklist

How to Test

What to Check

Verify that the following are valid

Other Information

ahammer commented 7 months ago

GPT Breakdown of the additions.

The provided code snippets appear to be part of an update to an Android application that uses Azure Communication Services, specifically extending the functionality to include "Rooms Calls" alongside existing "Group Calls" and "Teams Meetings". This is done by introducing a new call type (ROOMS_CALL), room ID (roomId), and participant roles (CallCompositeParticipantRole with PRESENTER and ATTENDEE) into the application. Let's review each part of the changes:

  1. Addition of ROOMS_CALL to CallType enum and new fields to CallConfiguration:

    • The addition of ROOMS_CALL is straightforward, indicating a new type of call supported by the application.
    • The CallConfiguration class has been expanded to include roomId, which is presumably a unique identifier for a room, and roomRoleHint, which suggests the intended role of the participant in the room call.
  2. Updates in CallingSDKWrapper.kt:

    • The logic for determining the type of call locator based on the callType has been updated to handle ROOMS_CALL, creating a RoomCallLocator with the provided roomId. This aligns with the application's strategy to support different types of calls through specific locators.
  3. UI Adjustments in CallLauncherActivity.kt:

    • New UI components (like radio buttons) and logic have been added to handle user interaction for selecting a rooms call, and to dynamically adjust the available roles based on the type of call selected. This enhances the user interface to accommodate the new call type and roles, making it user-friendly and interactive.
  4. Handling Rooms Call in CallLauncherViewModel.kt and CallComposite.java:

    • The logic to launch a call composite with the new CallCompositeRoomLocator is introduced, handling cases where a rooms call is initiated. It ensures that the room ID and role are passed correctly to set up the call.
    • In CallComposite.java, the configuration is extended to support roomId and roomRole, demonstrating how the application's internal logic adapts to accommodate rooms calls.
  5. Definition of CallCompositeParticipantRole and CallCompositeRoomLocator:

    • The CallCompositeParticipantRole class provides a clear definition of possible roles within a rooms call, allowing for explicit role management and assignment.
    • The CallCompositeRoomLocator class facilitates the initiation of rooms calls by holding the room ID, serving as a specific locator type for this call mode.
  6. XML UI Changes:

    • The introduction of a new RadioButton for selecting rooms meetings in the UI (activity_call_launcher.xml) indicates a direct interaction point for the user to choose this new call type, integrating it into the existing UI layout seamlessly.

Overall Review: