TrustedWebActivityIntent
class TrustedWebActivityIntent
Holds an Intent and other data necessary to start a Trusted Web Activity.
Summary
Public functions |
|
|---|---|
(Mutable)List<TrustedWebActivityDisplayMode!> |
Used by the web app manifest to specify the fallback order for display modes. |
FileHandlingData? |
|
Intent |
Returns the held |
Int |
Used for Launch Handler API to provide client mode to a browser. |
Uri? |
Used by Protocol Handlers to provide context for the browser. |
Unit |
launchTrustedWebActivity(context: Context)Launches a Trusted Web Activity. |
Public functions
getDisplayOverrideList
fun getDisplayOverrideList(): (Mutable)List<TrustedWebActivityDisplayMode!>
Used by the web app manifest to specify the fallback order for display modes. This can be changed using setDisplayOverrideList.
| Returns | |
|---|---|
(Mutable)List<TrustedWebActivityDisplayMode!> |
A list of |
getIntent
fun getIntent(): Intent
Returns the held Intent. For launching a Trusted Web Activity prefer using launchTrustedWebActivity.
getLaunchHandlerClientMode
fun getLaunchHandlerClientMode(): Int
Used for Launch Handler API to provide client mode to a browser. {@see https://developer.mozilla.org/en-US/docs/Web/API/Launch_Handler_API}
| Returns | |
|---|---|
Int |
An integer that represents Launch Handler API client mode. |
getOriginalLaunchUrl
fun getOriginalLaunchUrl(): Uri?
Used by Protocol Handlers to provide context for the browser. When a custom data scheme link (e.g. web+coffee://latte) is being processed by a WebAPK/TWA, it will get replaced with an actual http/https location (e.g. https://coffee.com/?type=latte) and that URL gets sent to the browser. This extra will then store the original link in case the browser needs different logic for Protocol Handlers and regular links. {@see https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest/Reference/protocol_handlers}
| Returns | |
|---|---|
Uri? |
The original URL before being processed by a Protocol Handler, or null if this was never a custom data scheme link. |
launchTrustedWebActivity
fun launchTrustedWebActivity(context: Context): Unit
Launches a Trusted Web Activity.