| java.lang.Object | ||
| ↳ | com.gsma.services.rcs.RcsService | |
| ↳ | com.gsma.services.rcs.upload.FileUploadService | |
This class offers the main entry point to upload a file to the RCS content server. Several applications may connect/disconnect to the API. There is no pause and resume supported here.
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.gsma.services.rcs.RcsService
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
FileUploadService(Context ctx, RcsServiceListener listener)
Constructor
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
addEventListener(FileUploadListener listener)
Adds a listener on file upload events
| ||||||||||
| boolean |
canUploadFile()
Can a file be uploaded now
| ||||||||||
| final void |
connect()
Connects to the API
| ||||||||||
| void |
disconnect()
Disconnects from the API
| ||||||||||
| FileUploadServiceConfiguration |
getConfiguration()
Returns the configuration of the file upload service
| ||||||||||
| FileUpload |
getFileUpload(String uploadId)
Returns a current file upload from its unique ID
| ||||||||||
| Set<FileUpload> |
getFileUploads()
Returns the list of file uploads in progress
| ||||||||||
| void |
removeEventListener(FileUploadListener listener)
Removes a listener on file upload events
| ||||||||||
| FileUpload |
uploadFile(Uri file, boolean attachFileIcon)
Uploads a file to the RCS content server.
| ||||||||||
|
[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 file upload events
| listener | Listener |
|---|
| RcsServiceNotAvailableException | |
| RcsGenericException | |
| RcsServiceNotAvailableException |
Can a file be uploaded now
| RcsServiceNotAvailableException | |
| RcsGenericException | |
| RcsServiceNotAvailableException |
Connects to the API
| RcsPermissionDeniedException |
|---|
Returns the configuration of the file upload service
| RcsServiceNotAvailableException | |
| RcsGenericException | |
| RcsServiceNotAvailableException |
Returns a current file upload from its unique ID
| uploadId | Upload ID |
|---|
| RcsServiceNotAvailableException | |
| RcsGenericException | |
| RcsServiceNotAvailableException |
Returns the list of file uploads in progress
| RcsServiceNotAvailableException | |
| RcsGenericException | |
| RcsServiceNotAvailableException |
Removes a listener on file upload events
| listener | Listener |
|---|
| RcsServiceNotAvailableException | |
| RcsGenericException | |
| RcsServiceNotAvailableException |
Uploads a file to the RCS content server. The parameter file contains the URI of the file to be uploaded (for a local or a remote file).
| file | Uri of file to upload |
|---|---|
| attachFileIcon | Attach file icon option. If true and if it's an image, a file icon is attached. |
| RcsMaxAllowedSessionLimitReachedException | |
| RcsServiceNotAvailableException | |
| RcsGenericException | |
| RcsMaxAllowedSessionLimitReachedException | |
| RcsServiceNotAvailableException |