Package-level declarations

Types

Link copied to clipboard

Optional install hook so the Android app shell can hand us an application Context (needed for the system Vibrator). Sound works without it; haptics no-op until set.

Link copied to clipboard
Link copied to clipboard

Device haptic pattern. A coarse, feel-based taxonomy the caller maps its own moments onto.

Link copied to clipboard
Link copied to clipboard

Registers the host app's notification channels. Idempotent — createNotificationChannels upserts by id, so calling it again on every launch (the recommended pattern) is safe.

Link copied to clipboard
data class NotificationChannelSpec(val id: String, val name: String, val description: String, val importance: Int = NotificationManager.IMPORTANCE_DEFAULT, val vibrate: Boolean = false)

A single notification channel the host app wants created. Kept app-agnostic — the app declares its own channels (ids, names, importance) and passes them to NotificationChannelManager.createChannels; this module owns none of them.

Link copied to clipboard
enum class SoundKey : Enum<SoundKey>

The short SFX vocabulary a caller draws on for UX feedback.

Link copied to clipboard
interface SoundPlayer

Plays short SFX by SoundKey and fires haptics by HapticPattern.

Functions

Link copied to clipboard
actual fun canShareImage(): Boolean

True only when a Context has been installed AND the host app actually declares the FileProvider.

expect fun canShareImage(): Boolean

Whether shareImage does anything on this platform right now. Android reports false until the host app has called FeedbackAndroid.install(context), because the share needs a Context.

actual fun canShareImage(): Boolean

True unconditionally. UIActivityViewController is part of UIKit — unlike Android, there is no host-app wiring (no Context, no FileProvider declaration) that can be missing.

actual fun canShareImage(): Boolean

Whether shareImage does anything on this platform right now. Android reports false until the host app has called FeedbackAndroid.install(context), because the share needs a Context.

actual fun canShareImage(): Boolean

Whether shareImage does anything on this platform right now. Android reports false until the host app has called FeedbackAndroid.install(context), because the share needs a Context.

Link copied to clipboard

Platform factory for the default SoundPlayer.

Platform factory for the default SoundPlayer.

Platform factory for the default SoundPlayer.

Platform factory for the default SoundPlayer.

Platform factory for the default SoundPlayer.

Link copied to clipboard
actual fun shareImage(pngBytes: ByteArray, fileName: String, text: String)

Android actual: writes the PNG into the app's cache and shares it as a content:// stream.

expect fun shareImage(pngBytes: ByteArray, fileName: String, text: String)

Shares an image with accompanying text through the platform share sheet.

actual fun shareImage(pngBytes: ByteArray, fileName: String, text: String)

iOS actual: writes the PNG into the temporary directory and hands its file URL to the share sheet alongside text, mirroring what the Android actual does with a content:// stream.

actual fun shareImage(pngBytes: ByteArray, fileName: String, text: String)

Not implemented on this target yet, matching shareText. canShareImage reports it honestly.

actual fun shareImage(pngBytes: ByteArray, fileName: String, text: String)

Not implemented on this target yet, matching shareText. canShareImage reports it honestly.

Link copied to clipboard
actual fun shareText(text: String)

Shares text through the platform share sheet.

expect fun shareText(text: String)

Shares text through the platform share sheet.

actual fun shareText(text: String)

iOS actual: UIActivityViewController, the counterpart to Android's ACTION_SEND chooser.

actual fun shareText(text: String)

Desktop has no system share sheet, so there is nothing to invoke: the JVM actual is a deliberate no-op rather than an unfinished function. A desktop host that wants sharing copies the text to the clipboard itself — that is a host decision, not something this module should guess at.

actual fun shareText(text: String)

Deliberate no-op. The Web Share API (navigator.share) is available only on a secure origin, only from inside a user-gesture handler, and not at all on most desktop browsers — calling it from here would throw on the majority of hosts. Wiring it up properly means routing the call through the host's gesture handler, which is a change to this module's contract, not a fix.