AndroidIntents
| Kind | class |
| Package | android.platform |
| Full name | android.platform.AndroidIntents |
| Source | source/android/platform/AndroidIntents.hx |
Common Android intents: opening URLs, files and Settings pages, and sharing content through the native share sheet.
Public fields
| Name | Type | Static | Default | Notes |
|---|---|---|---|---|
onDeepLink | FlxTypedSignal<String->Void> | yes | — | property (get, never) · Incoming phoenix:// deep links (also fired for the cold-start intent). |
Public methods
subscribeDeepLink
static function subscribeDeepLink(listener:String->Void):Void
Subscribes to incoming deep links. Prefer this over adding directly to
onDeepLink: it registers the subscription with the delivery tracker
so a buffered cold-start deep link is delivered to you as soon as it
becomes available.
| Parameter | Type | Default |
|---|---|---|
listener | String->Void | — |
openUrl
static function openUrl(url:String):Void
Opens a URL in the system browser.
| Parameter | Type | Default |
|---|---|---|
url | String | — |
openSettings
static function openSettings(?action:String):Void
Opens a Settings page. Pass either a full action ("android.settings.APPLICATION_DETAILS_SETTINGS") or a short name ("WIFI_SETTINGS"); empty opens the main Settings screen.
| Parameter | Type | Default |
|---|---|---|
action (optional) | String | — |
openFile
static function openFile(path:String):Void
Opens a local file with whatever app handles its type.
| Parameter | Type | Default |
|---|---|---|
path | String | — |
shareFile
static function shareFile(path:String, ?mime:String, ?title:String):Void
Shares a local file through Android's share sheet.
| Parameter | Type | Default |
|---|---|---|
path | String | — |
mime (optional) | String | — |
title (optional) | String | — |
shareText
static function shareText(text:String, ?title:String):Void
Shares text through Android's share sheet.
| Parameter | Type | Default |
|---|---|---|
text | String | — |
title (optional) | String | — |
viewContentUri
static function viewContentUri(uri:String, ?mime:String):Void
Opens a content:// URI with an external app.
| Parameter | Type | Default |
|---|---|---|
uri | String | — |
mime (optional) | String | — |
Internals
Private / internal members
| Field | Type | Static |
|---|---|---|
_openUrl | Dynamic | yes |
_openSettings | Dynamic | yes |
_openFile | Dynamic | yes |
_shareFile | Dynamic | yes |
_shareText | Dynamic | yes |
_viewContentUri | Dynamic | yes |
| Method |
|---|
static inline function get_onDeepLink():FlxTypedSignal<String->Void> |
static function openUrl_jni(url:String):Void |
static function openSettings_jni(action:String):Void |
static function openFile_jni(path:String):Void |
static function shareFile_jni(path:String, mime:String, title:String):Void |
static function shareText_jni(text:String, title:String):Void |
static function viewContentUri_jni(uri:String, mime:String):Void |