public final class

VideoSharingService

extends RcsService
java.lang.Object
   ↳ com.gsma.services.rcs.RcsService
     ↳ com.gsma.services.rcs.sharing.video.VideoSharingService

Class Overview

This class offers the main entry point to share live video during a CS call. Several applications may connect/disconnect to the API. The parameter contact in the API supports the following formats: MSISDN in national or international format, SIP address, SIP-URI or Tel-URI.

Summary

[Expand]
Inherited Constants
From class com.gsma.services.rcs.RcsService
Public Constructors
VideoSharingService(Context ctx, RcsServiceListener listener)
Constructor
Public Methods
void addEventListener(VideoSharingListener listener)
Adds a listener on video sharing events
final void connect()
Connects to the API
void deleteVideoSharing(String sharingId)
Deletes a video sharing by its sharing ID from history and abort/reject any associated ongoing session if such exists.
void deleteVideoSharings()
Deletes all video sharing from history and abort/reject any associated ongoing session if such exists.
void deleteVideoSharings(ContactId contact)
Delete video sharing associated with a given contact from history and abort/reject any associated ongoing session if such exists.
void disconnect()
Disconnects from the API
VideoSharingServiceConfiguration getConfiguration()
Returns the configuration of video sharing service
VideoSharing getVideoSharing(String sharingId)
Returns a current video sharing from its unique ID
void removeEventListener(VideoSharingListener listener)
Removes a listener on video sharing events
VideoSharing shareVideo(ContactId contact, VideoPlayer player)
Shares a live video with a contact.
[Expand]
Inherited Methods
From class com.gsma.services.rcs.RcsService
From class java.lang.Object

Public Constructors

public VideoSharingService (Context ctx, RcsServiceListener listener)

Constructor

Parameters
ctx Application context
listener Service listener

Public Methods

public void addEventListener (VideoSharingListener listener)

Adds a listener on video sharing events

Parameters
listener Listener
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public final void connect ()

Connects to the API

public void deleteVideoSharing (String sharingId)

Deletes a video sharing by its sharing ID from history and abort/reject any associated ongoing session if such exists.

Parameters
sharingId the sharing ID
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public void deleteVideoSharings ()

Deletes all video sharing from history and abort/reject any associated ongoing session if such exists.

Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public void deleteVideoSharings (ContactId contact)

Delete video sharing associated with a given contact from history and abort/reject any associated ongoing session if such exists.

Parameters
contact the remote contact
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public void disconnect ()

Disconnects from the API

public VideoSharingServiceConfiguration getConfiguration ()

Returns the configuration of video sharing service

Returns
  • VideoSharingServiceConfiguration
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public VideoSharing getVideoSharing (String sharingId)

Returns a current video sharing from its unique ID

Parameters
sharingId Sharing ID
Returns
  • VideoSharing Video sharing or null if not found
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public void removeEventListener (VideoSharingListener listener)

Removes a listener on video sharing events

Parameters
listener Listener
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public VideoSharing shareVideo (ContactId contact, VideoPlayer player)

Shares a live video with a contact. The parameter renderer contains the video player provided by the application. An exception if thrown if there is no ongoing CS call. 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
contact Contact identifier
player Video player
Returns
  • VideoSharing
Throws
RcsPersistentStorageException
RcsServiceNotRegisteredException
RcsServiceNotAvailableException
RcsGenericException
RcsPersistentStorageException
RcsServiceNotAvailableException
RcsServiceNotRegisteredException