PhoneCallEventDataSourceImpl

internal class PhoneCallEventDataSourceImpl(val logger: Logger, val context: Context, val clock: Clock) : PhoneCallEventDataSource

A data source for capturing phone call events and providing them.

This class listens for phone call events using a BroadcastReceiver and emits relevant call information, such as call start and end events.

Constructors

Link copied to clipboard
constructor(logger: Logger, context: Context, clock: Clock)

Properties

Link copied to clipboard
private val clock: Clock

An instance of Clock used for timestamping the phone call events.

Link copied to clipboard
private val context: Context

An instance of Context used for registering and unregistering the BroadcastReceiver.

Link copied to clipboard
private val logger: Logger

An instance of Logger used for logging events.

Functions

Link copied to clipboard

Returns a BroadcastReceiver for listening to phone call events. The events are emitted via the onEvent callback.

Link copied to clipboard
open override fun getRx(): Flow<PhoneCallEventDataModel>
Link copied to clipboard

Registers the receiver for listening to phone call events.