SettingsPlatformActions

Platform bridge for Settings actions that cannot be implemented in common code.

Implementations request Android/iOS permissions, open external URLs or app settings, and expose platform capability flags used to hide unsupported Settings rows.

Author

Dmitriy Moroz

Inheritors

Properties

Link copied to clipboard

Localization key for the warning shown under the background generation toggle.

Link copied to clipboard

True when saving generated images through MediaStore still needs a runtime storage permission.

Link copied to clipboard

True when this target can continue generation work after the app leaves foreground.

Functions

Link copied to clipboard
abstract suspend fun clearAppCache()

Clears app cache files after a caller has shown destructive confirmation.

Link copied to clipboard
abstract suspend fun getAllDownloadedModelsBytes(): Long

Returns total bytes occupied by every downloaded model directory visible to the platform.

Link copied to clipboard
abstract suspend fun getAppCacheBytes(): Long

Returns current app cache byte size for the Settings summary row.

Link copied to clipboard
abstract suspend fun getDownloadedModelsBytes(modelIds: List<String>): Long

Returns total bytes occupied by downloaded model directories for modelIds.

Link copied to clipboard
open fun mapStorageBytesForUi(bytes: Long): Long

Converts a raw storage counter into a user-visible amount.

Link copied to clipboard
abstract fun openAppSettings()

Opens this app's platform settings page.

Link copied to clipboard
abstract fun openUrl(url: String)

Opens an external URL through the platform.

Link copied to clipboard
abstract suspend fun requestNotificationPermission(): Boolean

Requests notification permission when the platform requires it for background generation.

Link copied to clipboard
abstract suspend fun requestStoragePermission(): Boolean

Requests storage/media permission when the platform requires it for gallery saves.

Link copied to clipboard
abstract fun shareLogFile()

Opens the problem-report channel with diagnostic context prepared by the platform.

Link copied to clipboard

Shows platform feedback after developer mode is unlocked.