PortalsPlugin

class PortalsPlugin(pubSub: PortalsPubSub = PortalsPubSub.shared) : Plugin

A special Capacitor Plugin within the Portals library that allows for bi-directional communication between Android and web code. It is loaded with every Portal automatically and does not need to be added like other plugins if the default behavior is desired.

If events should be scoped to a specific Portal or group of Portals, this should be initialized with an instance of PortalsPubSub and added to a Portal via Portal.addPluginInstance or PortalBuilder.addPluginInstance.

Constructors

Link copied to clipboard
fun PortalsPlugin(pubSub: PortalsPubSub = PortalsPubSub.shared)

Functions

Link copied to clipboard
open override fun addListener(call: PluginCall?)

Allows the web to subscribe to messages from native.

Link copied to clipboard
open fun checkPermissions(p0: PluginCall)
Link copied to clipboard
open fun execute(p0: Runnable)
Link copied to clipboard
open fun freeSavedCall()
Link copied to clipboard
Link copied to clipboard
open fun getAppId(): String
Link copied to clipboard
open fun getBridge(): Bridge
Link copied to clipboard
open fun getConfig(): PluginConfig
Link copied to clipboard
open fun getConfigValue(p0: String): Any
Link copied to clipboard
open fun getContext(): Context
Link copied to clipboard
open fun getPermissionState(p0: String): PermissionState
Link copied to clipboard
open fun getPermissionStates(): MutableMap<String, PermissionState>
Link copied to clipboard
open fun getPluginHandle(): PluginHandle
Link copied to clipboard
open fun getSavedCall(): PluginCall
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun load()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun publishNative(call: PluginCall)

Publishes a message from the web app to the native app.

Link copied to clipboard
open fun removeAllListeners(p0: PluginCall)
Link copied to clipboard
open fun removeListener(p0: PluginCall)
Link copied to clipboard
open fun requestPermissions(p0: PluginCall)
Link copied to clipboard
open fun saveCall(p0: PluginCall)
Link copied to clipboard
open fun setBridge(p0: Bridge)
Link copied to clipboard
open fun setPluginHandle(p0: PluginHandle)
Link copied to clipboard
Link copied to clipboard
open fun startActivityForResult(p0: PluginCall, p1: Intent, p2: String)