public final class

MultimediaSessionService

extends RcsService
java.lang.Object
   ↳ com.gsma.services.rcs.RcsService
     ↳ com.gsma.services.rcs.extension.MultimediaSessionService

Class Overview

This class offers the main entry point to initiate and to manage multimedia sessions. Several applications may connect/disconnect to the API.

Summary

[Expand]
Inherited Constants
From class com.gsma.services.rcs.RcsService
Public Constructors
MultimediaSessionService(Context ctx, RcsServiceListener listener)
Constructor
Public Methods
void addEventListener(MultimediaStreamingSessionListener listener)
Adds a listener on multimedia streaming session events
void addEventListener(MultimediaMessagingSessionListener listener)
Adds a listener on multimedia messaging session events
final void connect()
Connects to the API
void disconnect()
Disconnects from the API
MultimediaSessionServiceConfiguration getConfiguration()
Returns the configuration of the multimedia session service
MultimediaMessagingSession getMessagingSession(String sessionId)
Returns a current messaging session from its unique session ID
Set<MultimediaMessagingSession> getMessagingSessions(String serviceId)
Returns the list of messaging sessions associated to a given service ID
MultimediaStreamingSession getStreamingSession(String sessionId)
Returns a current streaming session from its unique session ID
Set<MultimediaStreamingSession> getStreamingSessions(String serviceId)
Returns the list of streaming sessions associated to a given service ID
MultimediaMessagingSession initiateMessagingSession(String serviceId, ContactId contact)
Initiates a new session for real time messaging with a remote contact and for a given service extension.
MultimediaStreamingSession initiateStreamingSession(String serviceId, ContactId contact)
Initiates a new session for real time streaming with a remote contact and for a given service extension.
void removeEventListener(MultimediaMessagingSessionListener listener)
Removes a listener on multimedia messaging session events
void removeEventListener(MultimediaStreamingSessionListener listener)
Removes a listener on multimedia streaming session events
[Expand]
Inherited Methods
From class com.gsma.services.rcs.RcsService
From class java.lang.Object

Public Constructors

public MultimediaSessionService (Context ctx, RcsServiceListener listener)

Constructor

Parameters
ctx Application context
listener Service listener

Public Methods

public void addEventListener (MultimediaStreamingSessionListener listener)

Adds a listener on multimedia streaming session events

Parameters
listener Session event listener
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public void addEventListener (MultimediaMessagingSessionListener listener)

Adds a listener on multimedia messaging session events

Parameters
listener Session event listener
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public final void connect ()

Connects to the API

public void disconnect ()

Disconnects from the API

public MultimediaSessionServiceConfiguration getConfiguration ()

Returns the configuration of the multimedia session service

Returns
  • MultimediaSessionServiceConfiguration
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public MultimediaMessagingSession getMessagingSession (String sessionId)

Returns a current messaging session from its unique session ID

Returns
  • MultimediaMessagingSession Multimedia messaging session or null if not found
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public Set<MultimediaMessagingSession> getMessagingSessions (String serviceId)

Returns the list of messaging sessions associated to a given service ID

Parameters
serviceId Service ID
Returns
  • Set<MultimediaMessagingSession> List of messaging sessions
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public MultimediaStreamingSession getStreamingSession (String sessionId)

Returns a current streaming session from its unique session ID

Returns
  • MultimediaStreamingSession Multimedia streaming session or null if not found
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public Set<MultimediaStreamingSession> getStreamingSessions (String serviceId)

Returns the list of streaming sessions associated to a given service ID

Parameters
serviceId Service ID
Returns
  • Set<MultimediaStreamingSession> List of streaming sessions
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public MultimediaMessagingSession initiateMessagingSession (String serviceId, ContactId contact)

Initiates a new session for real time messaging with a remote contact and for a given service extension. The messages are exchanged in real time during the session may be from any type. The parameter contact supports the following formats: MSISDN in national or international format, SIP address, SIP-URI or Tel-URI. If the format of the contact is not supported an exception is thrown.

Parameters
serviceId Service ID
contact Contact identifier
Returns
  • MultimediaMessagingSession
Throws
RcsServiceNotRegisteredException
RcsPermissionDeniedException
RcsServiceNotAvailableException
RcsGenericException
RcsPermissionDeniedException
RcsServiceNotAvailableException
RcsServiceNotRegisteredException

public MultimediaStreamingSession initiateStreamingSession (String serviceId, ContactId contact)

Initiates a new session for real time streaming with a remote contact and for a given service extension. The payload are exchanged in real time during the session and may be from any type. The parameter contact supports the following formats: MSISDN in national or international format, SIP address, SIP-URI or Tel-URI. If the format of the contact is not supported an exception is thrown.

Parameters
serviceId Service ID
contact Contact ID
Returns
  • MultimediaStreamingSession
Throws
RcsServiceNotRegisteredException
RcsPermissionDeniedException
RcsServiceNotAvailableException
RcsGenericException
RcsPermissionDeniedException
RcsServiceNotAvailableException
RcsServiceNotRegisteredException

public void removeEventListener (MultimediaMessagingSessionListener listener)

Removes a listener on multimedia messaging session events

Parameters
listener Session event listener
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public void removeEventListener (MultimediaStreamingSessionListener listener)

Removes a listener on multimedia streaming session events

Parameters
listener Session event listener
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException