ExtensionClient

Interface to be implemented by every Extension, create your network client, database client, etc. here.

If using OkHttpClient, use the custom await function for suspending the network call.

val request = Request.Builder().url("https://example.com").build()
val response = client.newCall(request).await()

This interface extends the SettingsProvider interface

Inheritors

Functions

Link copied to clipboard
abstract suspend fun getSettingItems(): List<Setting>

List of Settings to be displayed in the settings screen

Link copied to clipboard
open suspend fun onExtensionSelected()

Only called when an extension is selected by the user, not when the extension is loaded Use the onInitialize for doing stuff to initialize the extension

Link copied to clipboard
open suspend fun onInitialize()

Called when the extension is loaded, called after all the injections are done. Only called once

Link copied to clipboard
abstract fun setSettings(settings: Settings)

Called when the extension is initialized, to provide the Settings to the extension