PlatformHelperRecentCalls

@IviExperimental(reasons = [])
class PlatformHelperRecentCalls(context: Context, account: Account? = Account(ACCOUNT_SOURCE_NAME, ACCOUNT_SOURCE_TYPE))

Util class to add and remove recent calls in Android ContactsProvider using a contentResolver. Each recent calls is added to the specified Account.

Account.name and the Account.type can be used to simulate different source of recent calls like for example different Bluetooth devices. If account is null the recent calls will be added to the phone storage account.

Requires permission android.permission.WRITE_CALL_LOG

Constructors

Link copied to clipboard
fun PlatformHelperRecentCalls(context: Context, account: Account? = Account(ACCOUNT_SOURCE_NAME, ACCOUNT_SOURCE_TYPE))

Types

Link copied to clipboard
object Companion
Link copied to clipboard
@IviExperimental(reasons = [])
interface PlatformRecentCallsHelperEvents : TraceEventListener

Functions

Link copied to clipboard
suspend fun addRecentCallsEntry(typedCall: TypedCall, callTime: Instant)

Add a single call with a name. Each TypedCall is a pair value (phone number, call type) with a none blank phone number.

Link copied to clipboard
suspend fun deleteRecentCalls()

Delete all the recent calls added by this PlatformHelperRecentCalls with the corresponding Account.name and Account.type from ContactsProvider.

Link copied to clipboard
suspend fun generateRandomRecentCallsEntry(minimumTime: Instant, maximumTime: Instant, callType: Int, seed: Random = Random)

Generate a call with random call time between minimumTime, maximumTime time.

Link copied to clipboard

Retrieve the recent calls entries from the database.