- 
                    
                    
- All Implemented Interfaces:
 
public interface Streem 
- 
                
                    
                    
- 
                                
                            
                                
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classStreem.Countrypublic enumStreem.InvitationTypepublic classStreem.LinkTypepublic final classStreem.StreemInvitationpublic final classStreem.StreemIdentitypublic classStreem.LoginCompletionResultpublic classStreem.LoginInvitationResultpublic classStreem.InvitationDialogResultpublic classStreem.CreateInvitationResultpublic classStreem.SupportedCountriesResultpublic final classStreem.Environmentpublic final classStreem.AppThemepublic classStreem.Userpublic final classStreem.UserProfilepublic final classStreem.Configurationpublic final classStreem.SessionConfigpublic final classStreem.ParticipantRequestpublic classStreem.Companion 
- 
                                
                            
                                
Method Summary
Modifier and Type Method Description abstract Unitlogin(Streem.UserProfile userProfile, Function1<Streem.LoginCompletionResult, Unit> resultCallback)Logs in the current user to the Streem SDK. abstract Unitlogin(Uri invitationUri, Boolean isExpert, Function1<Streem.LoginInvitationResult, Unit> resultCallback)Logs in the user invited via the invitation Uri and passes back invitation details (the inviter's name, company, avatar image URL, etc. abstract Unitlogin(String invitationCode, Boolean isExpert, Function1<Streem.LoginInvitationResult, Unit> resultCallback)Logs in the user invited via the invitation code and passes back invitation details (the inviter's name, company, avatar image URL, etc. abstract UnitstartStreemActivity(Activity currentActivity, Streem.SessionConfig localParticipantSessionConfig, Streem.ParticipantRequest remoteParticipant)Opens a room with the participants in a new full-screen Activity. abstract UnitstartStreemActivity(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. abstract UnitstartStreemActivity(Fragment currentFragment, Streem.SessionConfig localParticipantSessionConfig, Streem.ParticipantRequest remoteParticipant)Opens a room with the participants in a new full-screen Activity. abstract UnitstartStreemActivity(Fragment currentFragment, Streem.SessionConfig localParticipantSessionConfig, Streem.ParticipantRequest remoteParticipant, Function1<Throwable, Unit> errorCallback)Opens a room with the participants in a new full-screen Activity. abstract UnitstartStreemActivity(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. abstract UnitstartStreemActivity(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. abstract UnitstartStreemToRemoteUser(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. abstract UnitstartStreemActivityForInvitation(String invitationCode, Activity currentActivity, Streem.SessionConfig localParticipantSessionConfig)Opens or joins a room with the current invitation in a new full-screen Activity. abstract UnitstartStreemActivityForInvitation(String invitationCode, Fragment currentFragment, Streem.SessionConfig localParticipantSessionConfig)Opens or joins a room with an invitation code in a new full-screen Activity. abstract StringgetExitCode(Integer requestCode, Integer resultCode, Intent data)Returns the exit code from the Streem experience if requestCode represents an Activity that was started by the Streem SDK. abstract Unitlogout()Logs out the user that was last logged in via login. abstract List<String>getRequiredPermissions()Returns a list of the permissions required to use the Streem SDK. abstract List<String>getMissingPermissions(Context context)Returns a list of the permissions required to use the Streem SDK that are not presently granted. abstract UnitgetSupportedCountries(Function1<Streem.SupportedCountriesResult, Unit> resultCallback)Returns a list of countries supported by the Streem service. abstract UnitcreateInvitation(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. abstract Streem.LinkTypeparseUri(Uri uri)Determines if a uri targets Streem and returns the relevant LinkType. abstract Streem.AppThemegetAppTheme()Sets the optional app theme with a primary color abstract UnitsetAppTheme(Streem.AppTheme appTheme)Sets the optional app theme with a primary color - 
                    
                    
                    
- 
                                
                            
                                
Method Detail
- 
                                        
login
abstract Unit login(Streem.UserProfile userProfile, Function1<Streem.LoginCompletionResult, Unit> resultCallback)
Logs in the current user to the Streem SDK. New users are automatically provisioned on first use. Existing users will have their profile information updated to match userProfile.
- Parameters:
 userProfile- the user profile to log inresultCallback- a function that is called with the LoginCompletionResult
 
- 
                                        
login
abstract Unit login(Uri invitationUri, Boolean isExpert, Function1<Streem.LoginInvitationResult, Unit> resultCallback)
Logs in the user invited via the invitation Uri and passes back invitation details (the inviter's name, company, avatar image URL, etc.) through resultCallback. With the StreemInvitation received in resultCallback, launch the Streem experience using StartStreemFromInvitation.
- Parameters:
 invitationUri- the invitation UriisExpert- whether the invited user is an expert.resultCallback- a function that is called with a LoginInvitationResult
 
- 
                                        
login
abstract Unit login(String invitationCode, Boolean isExpert, Function1<Streem.LoginInvitationResult, Unit> resultCallback)
Logs in the user invited via the invitation code and passes back invitation details (the inviter's name, company, avatar image URL, etc.) through resultCallback. With the StreemInvitation received in resultCallback, launch the Streem experience using StartStreemFromInvitation.
- Parameters:
 invitationCode- the invitation code of the invited user's invitation.isExpert- whether the invited user is an expert.resultCallback- a function that is called with a LoginInvitationResult
 
- 
                                        
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'sonActivityResultmethod 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'sonActivityResultmethod 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 startsremoteParticipant- 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'sonActivityResultmethod 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'sonActivityResultmethod 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'sonActivityResultmethod 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'sonActivityResultmethod will be called with the room's exit code.invitation- the invitation to uselocalParticipantSessionConfig- the SessionConfig of the local usererrorCallback- 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'sonActivityResultmethod 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 usecurrentActivity- this Activity'sonActivityResultmethod 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 usecurrentFragment- this Fragment'sonActivityResultmethod will be called with the room's exit code.localParticipantSessionConfig- the SessionConfig of the local user
 
- 
                                        
getExitCode
abstract String getExitCode(Integer requestCode, Integer resultCode, Intent data)
Returns the exit code from the Streem experience if requestCode represents an Activity that was started by the Streem SDK. Otherwise returns
null. This method should be called from Activity.onActivityResult or Fragment.onActivityResult. It should only be called when resultCode == RESULT_OK in order to avoid calling Streem.get() before the Streem SDK has been initialized.This can be EXIT_CODE_HELP or EXIT_CODE_EXIT if the user exited via one of the toolbar buttons.
 
- 
                                        
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.
 
- 
                                        
getRequiredPermissions
abstract List<String> getRequiredPermissions()
Returns a list of the permissions required to use the Streem SDK.
 
- 
                                        
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
phoneparam, 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.
 
- 
                                        
parseUri
abstract Streem.LinkType parseUri(Uri uri)
 
- 
                                        
getAppTheme
abstract Streem.AppTheme getAppTheme()
Sets the optional app theme with a primary color
 
- 
                                        
setAppTheme
abstract Unit setAppTheme(Streem.AppTheme appTheme)
Sets the optional app theme with a primary color
- Parameters:
 appTheme- The app theme to be set
 
 - 
                                        
 
 - 
                                
                            
                                
 
 - 
                    
                    
                    
 
 -