IviServiceHostConfig

constructor(serviceHostBuilderName: String, implementationModule: ModuleReference, interfaces: List<IviServiceInterfaceConfig>, dependencies: IviServiceDependencies = IviServiceDependencies(), requiresMainProcess: Boolean = false, tags: List<String> = emptyList(), subPackageName: String? = null, singleUser: Boolean = false)

Parameters

serviceHostBuilderName

The name of the service host builder class that must be formatted in PascalCase and must end with the "ServiceHostBuilder" suffix. The suffix is mandatory to allow the configuration to be found easier when searching the code base.

implementationModule

The module that implements the service host and contains the builder class.

interfaces

The service interface of the service host.

dependencies

The service interface dependencies of the service host implementation.

requiresMainProcess

Indicates the implementation needs to run in the same process as the main application. Cannot be used in combination with singleUser.

tags

Optional tags.

subPackageName

Optional sub package. If not null, this value is appended to the ModuleReference.packageName of the implementationModule property with a period in between.

singleUser

If true, Android will instantiate that service host in a process running as user 0 only. Any requests to connect to this service host, from any user will be routed to the process in user 0. Cannot be used in combination with requiresMainProcess. If false, the service host will run in a process specific for each user. See Building Multiuser-Aware Apps for more information.