java.lang.Object | |
↳ | fm.audiobox.core.net.Upload |
Uploads media files to AudioBox Cloud.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Upload(AudioBoxClient audioBoxClient, File file, NetworkProgressListener listener)
Instantiates a new Upload.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
NetworkProgressListener |
getListener()
Gets listener.
| ||||||||||
void |
setListener(NetworkProgressListener listener)
Sets listener.
| ||||||||||
MediaFile |
start()
Starts to upload media files to AudioBox Cloud.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Instantiates a new Upload.
audioBoxClient | the client |
---|---|
file | the file to upload on AudioBox |
listener | the listener |
Sets listener.
listener | the listener |
---|
Starts to upload media files to AudioBox Cloud.
If the subscription is not validForbiddenException
is thrown.
If a media file already exists on AudioBox Cloud FileAlreadyUploaded
is thrown.
Other errors may include ValidationException
,
SystemOverloadedException
or RemoteMessageException
with additional information in the exception body.
The application should ensure to accept those errors and retry accordingly after few minutes.
On successful upload the server returns a new MediaFile
with additional information,
including the token assigned to the newly uploaded media file.
Files uploaded through this method will go directly into the CloudPlaylist.
MediaFile
containing additional informationAudioBoxException | if any of the remote error exception is detected. |
---|---|
IllegalStateException | if the operation is already running or it's completed |
IOException | if any connection problem occurs. |