launch

fun launch(context: Context, serviceClass: Class<out BaseScreenRecorderService>, enableAudio: Boolean, onServiceCreated: (BaseScreenRecorderStreamer) -> Unit, onServiceDisconnected: (name: ComponentName?) -> Unit)

Starts and binds the service with the appropriate parameters.

Parameters

context

The application context.

serviceClass

The service class to launch. It is a children of BaseScreenRecorderService.

enableAudio

enable or disable audio.

onServiceCreated

Callback that returns a children of BaseScreenRecorderService instance when the service has been connected.

onServiceDisconnected

Callback that will be called when the service is disconnected.


fun launch(context: Context, serviceClass: Class<out BaseScreenRecorderService>, constructorBundle: Bundle, onServiceCreated: (BaseScreenRecorderStreamer) -> Unit, onServiceDisconnected: (name: ComponentName?) -> Unit)

Starts and binds the service with the appropriate parameters.

Parameters

context

The application context.

serviceClass

The service class to launch. It is a children of BaseScreenRecorderService.

constructorBundle

the streamer constructor configuration Bundle.

onServiceCreated

Callback that returns a children of BaseScreenRecorderService instance when the service has been connected.

onServiceDisconnected

Callback that will be called when the service is disconnected.