AndroidDiscord
| Kind | class |
| Package | android.platform |
| Full name | android.platform.AndroidDiscord |
| Source | source/android/platform/AndroidDiscord.hx |
Android stand-in for Discord Rich Presence.
Discord's RPC SDK is desktop-only and Android has no native rich
presence API. The system media session on Android is owned by
PlayStateAndroidMedia during gameplay; this class intentionally does
NOT touch it, so toggling Discord RPC in the options (which calls
shutdown) can never tear down or overwrite an active media session.
This keeps DiscordClient callers platform-agnostic behind one API
(the platform abstraction described in the roadmap).
Public methods
initialize
static function initialize():Void
shutdown
static function shutdown():Void
changePresence
static function changePresence(details:String, state:String, ?largeImageKey:String, ?durationMs:Float):Void
Mirrors DiscordClient.changePresence on Android. Menu presence is
not surfaced on Android (there is no Discord client); the session is
only published for actual gameplay by PlayStateAndroidMedia.
| Parameter | Type | Default |
|---|---|---|
details | String | — |
state | String | — |
largeImageKey (optional) | String | — |
durationMs (optional) | Float | — |
Internals
Private / internal members
| Field | Type | Static |
|---|---|---|
running | Bool | yes |