Package 

Interface Streem

  • All Implemented Interfaces:

    
    public interface Streem
    
                        
    • Constructor Detail

    • Method Detail

      • startStreemActivity

        @MainThread()@Deprecated(message = "As of v0.10.0, please use new method with errorCallback", replaceWith = @ReplaceWith(imports = {}, expression = "startStreemActivity(currentActivity, localParticipantSessionConfig, remoteParticipant) { error -> }")) abstract Unit startStreemActivity(Activity currentActivity, Streem.SessionConfig localParticipantSessionConfig, Streem.ParticipantRequest remoteParticipant)

        Opens a room with the participants in a new full-screen Activity.

        Parameters:
        currentActivity - this Activity's onActivityResult method will be called with the room's exit code.
        remoteParticipant - the remote participant to invite to the room.
      • startStreemActivity

        @MainThread()@Deprecated(message = "As of v0.26.0, please use new suggested way to start a Streem via Activity Results API outlined in the ReadMe") abstract Unit startStreemActivity(Activity currentActivity, Streem.SessionConfig localParticipantSessionConfig, InitialCallState initialCallState, Streem.ParticipantRequest remoteParticipant, String referenceId, String integrationId, Function1<Throwable, Unit> errorCallback)

        Opens a room with the participants in a new full-screen Activity.

        Parameters:
        currentActivity - this Activity's onActivityResult method will be called with the room's exit code.
        localParticipantSessionConfig - the SessionConfig of the local user.
        initialCallState - specifies initial state of mute/camera/speaker when the call starts
        remoteParticipant - the remote participant to invite to the room.
        referenceId - the reference ID to use for the room, or null if none.
        integrationId - the integration ID to use for the room, or null if none.
        errorCallback - a function that is called with a Throwable when an error occurs.
      • startStreemActivity

        @MainThread()@Deprecated(message = "As of v0.10.0, please use new method with errorCallback", replaceWith = @ReplaceWith(imports = {}, expression = "startStreemActivity(currentFragment, localParticipantSessionConfig, remoteParticipant) { error -> }")) abstract Unit startStreemActivity(Fragment currentFragment, Streem.SessionConfig localParticipantSessionConfig, Streem.ParticipantRequest remoteParticipant)

        Opens a room with the participants in a new full-screen Activity.

        Parameters:
        currentFragment - this Fragment's onActivityResult method will be called with the room's exit code.
        remoteParticipant - the remote participant to invite to the room.
      • startStreemActivity

        @MainThread() abstract Unit startStreemActivity(Fragment currentFragment, Streem.SessionConfig localParticipantSessionConfig, Streem.ParticipantRequest remoteParticipant, Function1<Throwable, Unit> errorCallback)

        Opens a room with the participants in a new full-screen Activity.

        Parameters:
        currentFragment - this Fragment's onActivityResult method will be called with the room's exit code.
        localParticipantSessionConfig - the SessionConfig of the local user.
        remoteParticipant - the remote participant to invite to the room.
        errorCallback - a function that is called with a Throwable when an error occurs.
      • startStreemActivity

        @MainThread()@Deprecated(message = "As of v0.14.0, please start Streem with registerForActivityResult(StartStreemFromInvitation())") abstract Unit startStreemActivity(Activity currentActivity, Streem.StreemInvitation invitation, Streem.SessionConfig localParticipantSessionConfig, Function1<Throwable, Unit> errorCallback)

        Opens or joins a room with the current invitation in a new full-screen Activity.

        Parameters:
        currentActivity - this Activity's onActivityResult method will be called with the room's exit code.
        invitation - the invitation to use.
        localParticipantSessionConfig - the SessionConfig of the local user.
        errorCallback - a function that is called with a Throwable when an error occurs.
      • startStreemActivity

        @MainThread()@Deprecated(message = "As of v0.14.0, please start Streem with registerForActivityResult(StartStreemFromInvitation())") abstract Unit startStreemActivity(Fragment currentFragment, Streem.StreemInvitation invitation, Streem.SessionConfig localParticipantSessionConfig, Function1<Throwable, Unit> errorCallback)

        Opens or joins a room with an invitation code in a new full-screen Activity.

        Parameters:
        currentFragment - this Fragment's onActivityResult method will be called with the room's exit code.
        invitation - the invitation to use
        localParticipantSessionConfig - the SessionConfig of the local user
        errorCallback - a function that is called with a Throwable when an error occurs.
      • startStreemToRemoteUser

        @MainThread() abstract Unit startStreemToRemoteUser(Activity currentActivity, String remoteUserId, String companyCode, String referenceId, String integrationId)

        Opens a room with the participants in a new full-screen Activity by way of the lobby.

        Parameters:
        currentActivity - this Activity's onActivityResult method will be called with the room's exit code.
        remoteUserId - the ID of the remote participant to invite to the room.
        companyCode - the company code that the remoteUserId belongs to.
        referenceId - the reference ID to use for the room, or null if none.
        integrationId - the integration ID to use for the room, or null if none.
      • startStreemActivityForInvitation

        @MainThread()@Deprecated(message = "As of v0.12.0, please use new login(invitationCode, isExpert, resultCallback) and use returned invitation to start Streem with registerForActivityResult(StartStreemFromInvitation())") abstract Unit startStreemActivityForInvitation(String invitationCode, Activity currentActivity, Streem.SessionConfig localParticipantSessionConfig)

        Opens or joins a room with the current invitation in a new full-screen Activity.

        Parameters:
        invitationCode - the invitation code to use
        currentActivity - this Activity's onActivityResult method will be called with the room's exit code.
        localParticipantSessionConfig - the SessionConfig of the local user
      • startStreemActivityForInvitation

        @MainThread()@Deprecated(message = "As of v0.12.0, please use new login(invitationCode, isExpert, resultCallback) and use returned invitation to start Streem with registerForActivityResult(StartStreemFromInvitation())") abstract Unit startStreemActivityForInvitation(String invitationCode, Fragment currentFragment, Streem.SessionConfig localParticipantSessionConfig)

        Opens or joins a room with an invitation code in a new full-screen Activity.

        Parameters:
        invitationCode - the invitation code to use
        currentFragment - this Fragment's onActivityResult method will be called with the room's exit code.
        localParticipantSessionConfig - the SessionConfig of the local user
      • logout

         abstract Unit logout()

        Logs out the user that was last logged in via login. This should be used whenever the user logs out from the app.

      • getMissingPermissions

         abstract List<String> getMissingPermissions(Context context)

        Returns a list of the permissions required to use the Streem SDK that are not presently granted.

        Parameters:
        context - the Context to use when checking each required permission's grant status.
      • getSupportedCountries

         abstract Unit getSupportedCountries(Function1<Streem.SupportedCountriesResult, Unit> resultCallback)

        Returns a list of countries supported by the Streem service. Typically this is used before calling createInvitation when submitting a phone param, which must include a country code. First call getSupportedCountries, then use the countries list to populate a form field for country code, and/or validate user-entered phone numbers before submitting them phone number to createInvitation.

        Parameters:
        resultCallback - a function that is called with a SupportedCountriesResult
      • createInvitation

         abstract Unit createInvitation(String toUserName, String referenceId, String integrationId, String phone, Streem.InvitationType invitationType, Function1<Streem.CreateInvitationResult, Unit> resultCallback)

        Creates an invitation to streem, and returns invitation information for display to the user.

        Parameters:
        toUserName - the full name of the user that is being invited to streem.
        referenceId - a referenceId for the invitation (optional).
        integrationId - an integrationId for the invitation (optional).
        phone - the user's phone number (optional).
        invitationType - the delivery mechanism for the invitation.
        resultCallback - a function that is called with the CreateInvitationResult.
      • setAppTheme

         abstract Unit setAppTheme(Streem.AppTheme appTheme)

        Sets the optional app theme with a primary color

        Parameters:
        appTheme - The app theme to be set