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.
Properties
Link copied to clipboard
An instance of Context used for registering and unregistering the BroadcastReceiver.
Functions
Link copied to clipboard
private fun createBroadcastReceiver(onEvent: (event: PhoneCallEventDataModel) -> Unit): BroadcastReceiver
Returns a BroadcastReceiver for listening to phone call events. The events are emitted via the onEvent callback.
Link copied to clipboard
Link copied to clipboard
Registers the receiver for listening to phone call events.