Skip to content

library / dev.bmcreations.scrcast / ScrCast

ScrCast

class ScrCast

Main Interface for accessing ScrCast Library

Properties

Name Summary
options Current Options for this instance.var options:Options
state The current RecordingState of the recordervar state:RecordingState

Functions

Name Summary
hasStoragePermissions Convenience method for clients to easily check if the required permissions are enabled for storage Even though we internally will bubble up the permission request and handle the allow/deny, some clients may want to onboard users via an OOBE or some UX state involving previously recorded files.fun hasStoragePermissions():Boolean
onRecordingComplete Set an explicit output file listener, as a kotlin lambda.fun onRecordingComplete(callback: RecordingOutputFileCallback):Unit
onRecordingStateChange Set an explicit state change listener, as a kotlin lambda, emitting changes of RecordingState as they occur.fun onRecordingStateChange(callback: RecordingStateChangeCallback):Unit
options Updates the configurations of ScrCast via a DSL.fun options(opts: OptionsBuilder.() ->Unit):Unit
pause Pauses a recording session that was started via recordfun pause():Unit
record Triggers a recording session based on the configuration's defined by optionsfun record():Unit
resume Resumed a recording session that was paused via pause, or triggers a new recording if the state is not paused.fun resume():Unit
setNotificationProvider Set the NotificationProvider for the ScrCast instance.fun setNotificationProvider(provider:NotificationProvider):Unit
setRecordingCallback Set the recording callbacks, emitting changes of RecordingState as they occur and a link to the output Filefun setRecordingCallback(listener:RecordingCallbacks?):Unit
stopRecording Triggers the end to a recording session that was started via recordfun stopRecording():Unit
updateOptions Updates the configurations of ScrCast.fun updateOptions(options:Options):Unit

Companion Object Functions

Name Summary
use Instance creator for ScrCast.fun use(activity: ComponentActivity):ScrCast