AndroidGalleryDetailPlatformActions

internal class AndroidGalleryDetailPlatformActions(val context: Context, val fileProviderDescriptor: FileProviderDescriptor, val dispatchersProvider: DispatchersProvider, val base64ToBitmapConverter: Base64ToBitmapConverter, val imageSaver: ImageSaver) : GalleryDetailPlatformActions, FileSavableExporter.BmpToFile(source)

Coordinates AndroidGalleryDetailPlatformActions behavior in the SDAI presentation layer.

Author

Dmitriy Moroz

Constructors

Link copied to clipboard
constructor(context: Context, fileProviderDescriptor: FileProviderDescriptor, dispatchersProvider: DispatchersProvider, base64ToBitmapConverter: Base64ToBitmapConverter, imageSaver: ImageSaver)

Types

Link copied to clipboard
private object Companion

Provides the companion object singleton used by the SDAI presentation layer.

Properties

Link copied to clipboard

Exposes the base64ToBitmapConverter value used by the SDAI presentation layer.

Link copied to clipboard
private val context: Context

Exposes the context value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the dispatchersProvider value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the fileProviderDescriptor value used by the SDAI presentation layer.

Link copied to clipboard
private val imageSaver: ImageSaver

Exposes the imageSaver value used by the SDAI presentation layer.

Functions

Link copied to clipboard
open suspend override fun copyText(text: String): GalleryDetailActionResult

Executes the copyText step in the SDAI presentation layer.

Link copied to clipboard
private inline suspend fun runPlatformAction(crossinline action: suspend () -> Unit): GalleryDetailActionResult

Executes the runPlatformAction step in the SDAI presentation layer.

Link copied to clipboard
open fun saveBitmapToFile(fileName: String, bitmap: Bitmap): File

Converts SDAI data with saveBitmapToFile.

Link copied to clipboard
open suspend override fun saveImage(base64: String): GalleryDetailActionResult

Performs the SDAI side effect handled by saveImage.

Link copied to clipboard
open suspend override fun shareImage(base64: String): GalleryDetailActionResult

Performs the SDAI side effect handled by shareImage.

Link copied to clipboard
open suspend override fun shareText(text: String): GalleryDetailActionResult

Performs the SDAI side effect handled by shareText.