registerResourceProvider

open fun registerResourceProvider(provider: ResourceProvider, apiLevel: Int, plugin: Plugin): ResourceProvider?(source)

Registers the given provider of resources with normal priority.

Return

registered provider or null if it was not registered.

Since

0.10.0

Parameters

provider

The ResourceProvider implementation.

apiLevel

Minimal required API level for this resource provider implementation: - if the required API level is higher than installed Mimic, provider will not be registered, - if the required API level is lower - will be enabled compatibility mode. Specify MimicApiLevel.CURRENT to use API level of Mimic dependency used at compile time.

plugin

The plugin implementing this resource provider.


abstract fun registerResourceProvider(provider: ResourceProvider, apiLevel: Int, plugin: Plugin, priority: ServicePriority): ResourceProvider?(source)

Registers the given provider of resources.

Return

registered provider or null if it was not registered.

Since

0.10.0

Parameters

provider

The ResourceProvider implementation.

apiLevel

Minimal required API level for this resource provider implementation: - if the required API level is higher than installed Mimic, provider will not be registered, - if the required API level is lower - will be enabled compatibility mode. Specify MimicApiLevel.CURRENT to use API level of Mimic dependency used at compile time.

plugin

The plugin implementing this resource provider.

priority

Default priority. If user have not configured resource-provider option in config, the primary resource is taken from the first provider in order of priority that has one.