Package-level declarations

Local media catalog management.

Photos catalogs manager.

Catalogs are folders where media files are stored. The catalog manager allows you to manage catalogs by providing, on command, library access to the media files in them.

Work with catalog manager.

import com.cloudike.sdk.photos.PhotoManager
import com.cloudike.sdk.photos.catalogs.CatalogManager
import kotlinx.coroutines.CoroutineScope

val scope = CoroutineScope()

// You can use PhotoManager.catalogs to work with catalog manager.
val catalogManager: CatalogManager = PhotoManager.catalogs

scope.launch {
catalogManager.createaCatalogsFlow().collect { // it: List<MediaCatalogItem>
// handle it...
}
}

// Than enable or disable catalogs with next methods

scope.launch {
val isEnabled = true
val catalogId = "id"

catalogManager.switchCatalog(catalogId, isEnabled)

catalogManager.switchCatalogs(setOf(catalogId), isEnabled)

catalogManager.switchAllCatalogs(isEnabled)
}

Logging

A set of tags that catalog operations use.

CatalogsSwitcher : [CL] [Ph] [Catalogs] - Catalogs switch operation.

SetAllCatalogEnabled : [CL] [Ph] [Catalogs] - All catalog creation operation.

Impact on library operation

When a directory is enabled, the images stored in it can participate in various operations. For example:

  1. Auto-upload

Types

Link copied to clipboard
interface CatalogManager

Catalogs are folders where media files are stored. The catalog manager allows you to manage catalogs by providing, on command, library access to the media files in them.

Link copied to clipboard
data class MediaCatalogItem(val id: Long, val path: String, val name: String, val isEnabled: Boolean) : Parcelable