Skip to main content

IAlbumManager

interface IAlbumManager

Description: Album management class

method getStorageLocation

fun getStorageLocation(callback: CommonCallbacks.CompletionCallbackWithParam<StorageTypeEnum>)

Description: Get the current storage device location

Input parameters: callback

Output parameters: None。

Related parameters: CompletionCallbackWithParam,StorageTypeEnum。

method setStorageLocation

fun setStorageLocation(type: StorageTypeEnum, callback: CommonCallbacks.CompletionCallback)

Description: Set storage device location

Input parameters: type: storage type [StorageTypeEnum] callback: set the result

Output parameters: None。

Related parameters: StorageTypeEnum,CompletionCallback。

method getMediaFileList

fun getMediaFileList(
type: MediaTypeEnum,
storageType: StorageTypeEnum,
albumName: String? = null,
offset: Int = 0,
count: Int,
order: OrderTypeEnum = OrderTypeEnum.NORMAL,
callback: CommonCallbacks.CompletionCallbackWithParam<AlbumResultBean>
)

Description: Get the list of album files

Input parameters: type: file type [MediaTypeEnum] storageType: storage device type [StorageTypeEnum] albumName: folder name If null is passed, all files will be obtained offset: offset value count: number of requests order: reverse chronological order [OrderTypeEnum] callback: return value

Output parameters: None。

Related parameters: MediaTypeEnum,StorageTypeEnum,CompletionCallbackWithParam,AlbumResultBean。

method getMediaFolderList

fun getMediaFolderList(
storageType: StorageTypeEnum,
order: OrderTypeEnum,
callback: CommonCallbacks.CompletionCallbackWithParam<AlbumFolderResultBean>
)

Description: Get the list of album folders

Input parameters: storageType: storage device type [StorageTypeEnum] order: reverse chronological order [OrderTypeEnum] callback: return value

Output parameters: None。

Related parameters: StorageTypeEnum,OrderTypeEnum,CompletionCallbackWithParam,AlbumFolderResultBean。

method deleteMediaFile

fun deleteMediaFile(
indexId: Int,
callback: CommonCallbacks.CompletionCallback
)

Description: Delete the specified album file or file package

Input parameters: indexId: file ID (Index) or file package Id (Index) storageType: storage device type callback: delete result

Output parameters: None。

Related parameters: CompletionCallback。

method downloadMediaFile

fun downloadMediaFile(
sourcePath:String,
destPath:String,
callback: CommonCallbacks.DownLoadCallbackWithProgress<Double>
)

Description: Download the specified album file

Input parameters: sourcePath: The path of the file to be downloaded destPath: save file path callback: download callback

Output parameters: None。

Related parameters: DownLoadCallbackWithProgress。

method cancelDownload

fun cancelDownload(request: BaseRequest)

Description: Cancel download

Input parameters: request: the request that is downloading the file

Output parameters: None。

Related parameters: None。