Portal

class Portal(val name: String)

A class representing a Portal that contains information about the web content to load and any associated plugins used by the Portal. It is discouraged to use this class directly to create a Portal and instead use PortalBuilder or PortalManager to construct a new instance.

Example usage (kotlin):

val name: String = "Hello World"
val portal: Portal = Portal(name)

Example usage (java):

String name = "Hello World";
Portal portal = new Portal(name);

Constructors

Link copied to clipboard
fun Portal(name: String)

Functions

Link copied to clipboard
fun addAssetMaps(assetMaps: <Error class: unknown class><String, AssetMap>)

Add multiple AssetMap instances to be loaded with this Portal.

Link copied to clipboard
fun addPlugin(plugin: Class<out Plugin?>)

Add a Capacitor Plugin to be loaded with this Portal.

Link copied to clipboard
fun addPluginInstance(plugin: Plugin)

Add a Capacitor Plugin instance to be loaded with this Portal.

Link copied to clipboard
fun addPluginInstances(plugins: List<Plugin>)

Add multiple Capacitor Plugin instances to be loaded with this Portal.

Link copied to clipboard
fun addPlugins(plugins: List<Class<out Plugin?>>)

Add multiple Capacitor Plugin to be loaded with this Portal.

Link copied to clipboard
fun setInitialContext(initialContext: String)
fun setInitialContext(initialContext: Map<String, Any>)

Sets the initial context to pass to the web view.

Properties

Link copied to clipboard
var devMode: Boolean = true

If the Portal should be loaded in development mode and look for a server URL.

Link copied to clipboard
var initialContext: Any? = null

The initial context to pass to the web view.

Link copied to clipboard
var liveUpdateConfig: LiveUpdate? = null

A LiveUpdate config, if live updates is being used.

Link copied to clipboard

Whether to run a live update sync when the portal is added to the manager.

Link copied to clipboard

the name of the Portal

Link copied to clipboard

The PortalFragment type used by a PortalView when using Portals directly in Android layouts/XML.

Link copied to clipboard

The start directory of the portal web app. Portals will use the name of the Portal by default if this value is not set.