sendFile

abstract fun sendFile(topic: FileTopic, file: File): Flowable<Int>

Sends a given file to the given remote device.

The returned Flowable emits the progress (0..100) and completes once the file has been uploaded successfully.

Notice, that the given file will only be accessed in a reading matter. The file will not be modified nor deleted. If you created this file solely for the purpose to send the file here, it's the callers responsibility to delete the file again.

Scheduler: The returned Flowable will operate on the IO Scheduler.

Return

a Flowable which emits the progress (0..100) and completes once the file has been successfully uploaded.

Parameters

topic

The FileTopic on which to send the file

file

The File to send.


abstract fun sendFile(topic: FileTopic, uri: Uri): Flowable<Int>

Sends a given file (defined by the given uri) to the given remote device.

The returned Flowable emits the progress (0..100) and completes once the file has been uploaded successfully.

Notice, that the given uri will only be accessed in a reading matter. The resource behind the uri will not be modified nor deleted. If you created this uri solely for the purpose to send the file here, it's the callers responsibility to delete the file again.

Scheduler: The returned Flowable will operate on the IO Scheduler.

Return

a Flowable which emits the progress (0..100) and completes once the file has been successfully uploaded.

Parameters

topic

The FileTopic on which to send the file

uri

The Uri of the file to send.