PluginContext

Everything a plugin may touch. Obtained in onEnable.

The context belongs to one run of the plugin. Do not keep it after onDisable.

Since

api 1

Functions

Link copied to clipboard
abstract fun events(): Events
Vehicle and hook events, delivered asynchronously on the worker.
Link copied to clipboard
abstract fun granted(permission: String): Boolean
Whether the user granted a permission.
Link copied to clipboard
abstract fun has(feature: String): Boolean
Whether the running firmware adapter supports a feature.
Link copied to clipboard
abstract fun hooks(): Hooks
Declarative parking hooks.
Link copied to clipboard
abstract fun log(): Log
The plugin's log, mirrored to /tmp/mibsdk.log on the unit.
Link copied to clipboard
abstract fun net(): Net
Loopback TCP queries.
Link copied to clipboard
abstract fun pluginId(): String
This plugin's id from plugin.json.
Link copied to clipboard
abstract fun scheduler(): Scheduler
Delayed and periodic tasks on the plugin's worker thread.
Link copied to clipboard
abstract fun storage(): Storage
Persistent key/value storage, capped per plugin and for all plugins.
Link copied to clipboard
abstract fun ui(): Ui
Declarative pages, Car-menu rows, the status-line item, toasts and dialogs.
Link copied to clipboard
abstract fun vehicle(): Vehicle
Vehicle state.
Link copied to clipboard
abstract fun wifi(): Wifi
The Wi-Fi client uplink.