java.lang.Object | ||
↳ | com.gsma.services.rcs.RcsService | |
↳ | com.gsma.services.rcs.sharing.image.ImageSharingService |
This class offers the main entry point to transfer image 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.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.gsma.services.rcs.RcsService
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ImageSharingService(Context ctx, RcsServiceListener listener)
Constructor
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addEventListener(ImageSharingListener listener)
Adds a listener on image sharing events
| ||||||||||
final void |
connect()
Connects to the API
| ||||||||||
void |
deleteImageSharing(String sharingId)
deletes an image sharing by its sharing id from history and abort/reject any associated
ongoing session if such exists.
| ||||||||||
void |
deleteImageSharings()
Deletes all image sharing from history and abort/reject any associated ongoing session if
such exists.
| ||||||||||
void |
deleteImageSharings(ContactId contact)
Deletes image sharing with a given contact from history and abort/reject any associated
ongoing session if such exists
| ||||||||||
void |
disconnect()
Disconnects from the API
| ||||||||||
ImageSharingServiceConfiguration |
getConfiguration()
Returns the configuration of image sharing service
| ||||||||||
ImageSharing |
getImageSharing(String sharingId)
Returns a current image sharing from its unique ID
| ||||||||||
void |
removeEventListener(ImageSharingListener listener)
Removes a listener on image sharing events
| ||||||||||
ImageSharing |
shareImage(ContactId contact, Uri file)
Shares an image with a contact.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.gsma.services.rcs.RcsService
| |||||||||||
From class
java.lang.Object
|
Constructor
ctx | Application context |
---|---|
listener | Service listener |
Adds a listener on image sharing events
listener | Listener |
---|
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsServiceNotAvailableException |
Connects to the API
RcsPermissionDeniedException |
---|
deletes an image sharing by its sharing id from history and abort/reject any associated ongoing session if such exists.
sharingId | the sharing ID |
---|
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsServiceNotAvailableException |
Deletes all image sharing from history and abort/reject any associated ongoing session if such exists.
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsServiceNotAvailableException |
Deletes image sharing with a given contact from history and abort/reject any associated ongoing session if such exists
contact | The remote contact |
---|
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsServiceNotAvailableException |
Returns the configuration of image sharing service
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsServiceNotAvailableException |
Returns a current image sharing from its unique ID
sharingId | Sharing ID |
---|
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsServiceNotAvailableException |
Removes a listener on image sharing events
listener | Listener |
---|
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsServiceNotAvailableException |
Shares an image with a contact. The parameter file contains the URI of the image to be shared (for a local or a remote image). 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.
contact | Contact identifier |
---|---|
file | Uri of file to share |
RcsServiceNotRegisteredException | |
RcsPersistentStorageException | |
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsPersistentStorageException | |
RcsServiceNotAvailableException | |
RcsServiceNotRegisteredException |