Platform

actual class Platform

Android platform implementation providing device information, text-to-speech, audio playback, toast notifications, and sharing capabilities.

expect class Platform

Platform-specific utilities abstraction.

Provides access to text-to-speech, location services, sharing, notifications, and other OS-level features. Implementations are provided per target (Android/iOS).

actual class Platform

iOS platform implementation providing device information, text-to-speech, audio playback, alert notifications, and sharing capabilities.

Constructors

Link copied to clipboard
constructor()
expect constructor()
constructor()

Properties

Link copied to clipboard
actual val fullName: String

The full platform name including SDK version level.

expect val fullName: String

Full platform name including version info.

actual val fullName: String

The full platform name including OS version.

Link copied to clipboard

The IM2LocationManager instance for accessing device location services.

Platform location manager for GPS and location updates.

The IM2LocationManager instance for accessing device location services.

Link copied to clipboard
actual val name: String

The short platform name.

expect val name: String

Short platform identifier (e.g. "android" or "ios").

actual val name: String

The short platform name.

Functions

Link copied to clipboard
actual fun getAppVersion(): String?

Returns the host application's version string.

expect fun getAppVersion(): String?

Returns the host application's version string, or null if unavailable.

actual fun getAppVersion(): String?

Returns the host application's version string.

Link copied to clipboard
actual fun isIos(): Boolean

Returns whether the current platform is iOS.

expect fun isIos(): Boolean

Checks whether this platform is iOS.

actual fun isIos(): Boolean

Returns whether the current platform is iOS.

Link copied to clipboard
actual fun playMp3(fileName: String)

Plays an MP3 audio file loaded from SDK resources.

expect fun playMp3(fileName: String)

Plays a bundled MP3 audio file.

actual fun playMp3(fileName: String)

Plays an MP3 audio file loaded from SDK resources.

Link copied to clipboard
actual fun say(text: String, langCode: String)

Speaks the given text aloud using the Android TextToSpeech engine.

expect fun say(text: String, langCode: String = "en-US")

Speaks the given text using the platform's text-to-speech engine.

actual fun say(text: String, langCode: String)

Speaks the given text aloud using the iOS AVSpeechSynthesizer.

Link copied to clipboard
actual fun share(title: String, text: String)

Opens the Android share sheet with the given content.

expect fun share(title: String, text: String)

Opens the platform share sheet with the given content.

actual fun share(title: String, text: String)

Opens the iOS share sheet with the given content.

Link copied to clipboard
actual fun stopSpeaking()

Stops any in-progress text-to-speech playback.

expect fun stopSpeaking()

Stops any in-progress text-to-speech playback.

actual fun stopSpeaking()

Stops any in-progress text-to-speech playback.

Link copied to clipboard
actual fun toast(message: String)

Displays a short Android Toast notification.

expect fun toast(message: String)

Shows a brief toast notification to the user.

actual fun toast(message: String)

Displays a short alert dialog (iOS equivalent of a toast notification).