Added in API level 1

Calls


open class Calls : BaseColumns
kotlin.Any
   ↳ android.provider.CallLog.Calls

Contains the recent calls.

Note: If you want to query the call log and limit the results to a single value, you should append the LIMIT_PARAM_KEY parameter to the content URI. For example:

<code>getContentResolver().query(
                  Calls.CONTENT_URI.buildUpon().appendQueryParameter(LIMIT_PARAM_KEY, "1")
                  .build(),
                  null, null, null, null);
  </code>

The call log provider enforces strict SQL grammar, so you CANNOT append "LIMIT" to the SQL query as below:

<code>getContentResolver().query(Calls.CONTENT_URI, null, "LIMIT 1", null, null);
  </code>

Summary

Constants
static Int

Call log type for a call which was answered on another device.

static String

String that stores the asserted display name associated with business call.

static Long

Value for CallLog.Calls#MISSED_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE to indicate that a call was automatically rejected by system because an ongoing emergency call.

static Long

Value for CallLog.Calls#MISSED_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE to indicate that a call was automatically rejected by system because the system cannot support any more dialing calls.

static Long

Value for CallLog.Calls#MISSED_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE to indicate that a call was automatically rejected by system because the system cannot support any more ringing calls.

static Int

Call log type for calls blocked automatically.

static String

Where the CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE, indicates the reason why a call is blocked.

static Int

Value for CallLog.Calls#BLOCK_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE to indicate that a call was blocked because it is in the BlockedNumbers provider.

static Int

Value for CallLog.Calls#BLOCK_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE to indicate that a call was blocked by a CallScreeningService.

static Int

Value for CallLog.Calls#BLOCK_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE to indicate that a call was blocked because the user configured a contact to be sent directly to voicemail.

static Int

Value for CallLog.Calls#BLOCK_REASON, set as the default value when a call was not blocked by a CallScreeningService or any other system call blocking method.

static Int

Value for CallLog.Calls#BLOCK_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE to indicate that a call was blocked because the user has chosen to block all calls from numbers not in their contacts.

static Int

Value for CallLog.Calls#BLOCK_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE to indicate that a call was blocked because the user has chosen to block all calls from pay phones.

static Int

Value for CallLog.Calls#BLOCK_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE to indicate that a call was blocked because the user has chosen to block all calls from restricted numbers.

static Int

Value for CallLog.Calls#BLOCK_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE to indicate that a call was blocked because the user has chosen to block all calls from unknown numbers.

static String

The cached phone number, formatted with formatting rules based on the country the user was in when the call was made or received.

static String

The cached URI to look up the contact associated with the phone number, if it exists.

static String

The cached phone number of the contact which matches this entry, if it exists.

static String

The cached name associated with the phone number, if it exists.

static String

The cached normalized(E164) version of the phone number, if it exists.

static String

The cached number label, for a custom number type, associated with the phone number, if it exists.

static String

The cached number type (Home, Work, etc) associated with the phone number, if it exists.

static String

The cached photo id of the picture associated with the phone number, if it exists.

static String

The cached photo URI of the picture associated with the phone number, if it exists.

static String

The name of the app which blocked a call.

static String

The ComponentName of the CallScreeningService which blocked this call.

static String

A reference to the picture that was sent via call composer.

static String

The MIME type of a CONTENT_URI sub-directory of a single call.

static String

The MIME type of CONTENT_URI and CONTENT_FILTER_URI providing a directory of calls.

static String

The ISO 3166-1 two letters country code of the country where the user received or made the call.

static String

The data usage of the call in bytes.

static String

The date the call occured, in milliseconds since the epoch

static String

The default sort order for this table

static String

The duration of the call in seconds

static String

An optional extra used with Calls.CONTENT_TYPE and Intent#ACTION_VIEW to specify that the presented list of calls should be filtered for a particular call type.

static String

Bit-mask describing features of the call (e.g. video).

static Int

Indicates the call underwent Assisted Dialing.

static Int

Call was HD.

static Int

Call was pulled externally.

static Int

Call was on RTT at some point

static Int

Call had video.

static Int

Call was VoLTE

static Int

Call was WIFI call.

static String

A geocoded location for the number associated with this call.

static Int

Call log type for incoming calls.

static String

Boolean indicating whether the call is a business call.

static String

Whether this item has been read or otherwise consumed by the user.

static String

The date the row is last inserted, updated, or marked as deleted, in milliseconds since the epoch.

static String

Query parameter used to limit the number of call logs returned.

static String

A reference to the location that was sent via call composer.

static String

Where the CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE, indicates factors which may have lead the user to miss the call.

static Long

Value for CallLog.Calls#MISSED_REASON, set as the default value when a call was not missed.

static Int

Call log type for missed calls.

static String

Whether or not the call has been acknowledged

static String

The phone number as the user entered it.

static String

The number presenting rules set by the network.

static String

Query parameter used to specify the starting record to return.

static Int

Call log type for outgoing calls.

static String

The component name of the account used to place or receive the call; in string form.

static String

The identifier for the account used to place or receive the call.

static String

The post-dial portion of a dialed number, including any digits dialed after a TelecomManager#DTMF_CHARACTER_PAUSE or a android.telecom.TelecomManager#DTMF_CHARACTER_WAIT and these characters themselves.

static Int

Number is allowed to display for caller id.

static Int

Number is a pay phone.

static Int

Number is blocked by user.

static Int

Number is unavailable.

static Int

Number is not specified or unknown by network.

static String

The priority of the call, as delivered via call composer.

static Int

Used as a value in the PRIORITY column.

static Int

Used as a value in the PRIORITY column.

static Int

Call log type for calls rejected by direct user action.

static String

The subject of the call, as delivered via call composer.

static String

Transcription of the call or voicemail entry.

static String

The type of the call (incoming, outgoing or missed).

static Long

When CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE, set this bit when the call filters timed out.

static Long

When CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE, set this bit when this call is silenced by the call screening service.

static Long

When CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE, set this bit when this call is silenced because the phone is in 'do not disturb mode'.

static Long

When CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE, set this bit when this call rings with a low ring volume.

static Long

When CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE, set this bit when the call was missed just because user didn't answer it.

static Long

When CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE set this bit when this call rings without vibration.

static Long

When CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE, set this bit when this call rang for a short period of time.

static String

For an incoming call, the secondary line number the call was received via.

static Int

Call log type for voicemails.

static String

URI of the voicemail entry.

Inherited constants
Public constructors

Public methods
open static String!

Query the call log database for the last dialed number.

Properties
static Uri!

The content:// style URL for filtering this table on phone numbers

static Uri!

The content:// style URL for this table

static Uri!

Content uri used to access call log entries, including voicemail records.

Constants

ANSWERED_EXTERNALLY_TYPE

Added in API level 25
static val ANSWERED_EXTERNALLY_TYPE: Int

Call log type for a call which was answered on another device. Used in situations where a call rings on multiple devices simultaneously and it ended up being answered on a device other than the current one.

Value: 7

ASSERTED_DISPLAY_NAME

Added in API level 35
static val ASSERTED_DISPLAY_NAME: String

String that stores the asserted display name associated with business call.

Value: "asserted_display_name"

AUTO_MISSED_EMERGENCY_CALL

Added in API level 31
static val AUTO_MISSED_EMERGENCY_CALL: Long

Value for CallLog.Calls#MISSED_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE to indicate that a call was automatically rejected by system because an ongoing emergency call.

Value: 1L

AUTO_MISSED_MAXIMUM_DIALING

Added in API level 31
static val AUTO_MISSED_MAXIMUM_DIALING: Long

Value for CallLog.Calls#MISSED_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE to indicate that a call was automatically rejected by system because the system cannot support any more dialing calls.

Value: 4L

AUTO_MISSED_MAXIMUM_RINGING

Added in API level 31
static val AUTO_MISSED_MAXIMUM_RINGING: Long

Value for CallLog.Calls#MISSED_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE to indicate that a call was automatically rejected by system because the system cannot support any more ringing calls.

Value: 2L

BLOCKED_TYPE

Added in API level 24
static val BLOCKED_TYPE: Int

Call log type for calls blocked automatically.

Value: 6

BLOCK_REASON_BLOCKED_NUMBER

Added in API level 29
static val BLOCK_REASON_BLOCKED_NUMBER: Int

Value for CallLog.Calls#BLOCK_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE to indicate that a call was blocked because it is in the BlockedNumbers provider.

Value: 3

BLOCK_REASON_CALL_SCREENING_SERVICE

Added in API level 29
static val BLOCK_REASON_CALL_SCREENING_SERVICE: Int

Value for CallLog.Calls#BLOCK_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE to indicate that a call was blocked by a CallScreeningService. The CallLog.Calls#CALL_SCREENING_COMPONENT_NAME and CallLog.Calls#CALL_SCREENING_APP_NAME columns will indicate which call screening service was responsible for blocking the call.

Value: 1

BLOCK_REASON_DIRECT_TO_VOICEMAIL

Added in API level 29
static val BLOCK_REASON_DIRECT_TO_VOICEMAIL: Int

Value for CallLog.Calls#BLOCK_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE to indicate that a call was blocked because the user configured a contact to be sent directly to voicemail.

Value: 2

BLOCK_REASON_NOT_BLOCKED

Added in API level 29
static val BLOCK_REASON_NOT_BLOCKED: Int

Value for CallLog.Calls#BLOCK_REASON, set as the default value when a call was not blocked by a CallScreeningService or any other system call blocking method.

Value: 0

BLOCK_REASON_NOT_IN_CONTACTS

Added in API level 29
static val BLOCK_REASON_NOT_IN_CONTACTS: Int

Value for CallLog.Calls#BLOCK_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE to indicate that a call was blocked because the user has chosen to block all calls from numbers not in their contacts.

Value: 7

BLOCK_REASON_PAY_PHONE

Added in API level 29
static val BLOCK_REASON_PAY_PHONE: Int

Value for CallLog.Calls#BLOCK_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE to indicate that a call was blocked because the user has chosen to block all calls from pay phones.

Value: 6

BLOCK_REASON_RESTRICTED_NUMBER

Added in API level 29
static val BLOCK_REASON_RESTRICTED_NUMBER: Int

Value for CallLog.Calls#BLOCK_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE to indicate that a call was blocked because the user has chosen to block all calls from restricted numbers.

Value: 5

BLOCK_REASON_UNKNOWN_NUMBER

Added in API level 29
static val BLOCK_REASON_UNKNOWN_NUMBER: Int

Value for CallLog.Calls#BLOCK_REASON, set when CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE to indicate that a call was blocked because the user has chosen to block all calls from unknown numbers.

Value: 4

CACHED_FORMATTED_NUMBER

Added in API level 21
static val CACHED_FORMATTED_NUMBER: String

The cached phone number, formatted with formatting rules based on the country the user was in when the call was made or received.

This value is typically filled in by the dialer app for the caching purpose, so it's not guaranteed to be present, and may not be current if the contact information associated with this number has changed.

Type: TEXT

Value: "formatted_number"

CACHED_LOOKUP_URI

Added in API level 21
static val CACHED_LOOKUP_URI: String

The cached URI to look up the contact associated with the phone number, if it exists.

This value is typically filled in by the dialer app for the caching purpose, so it's not guaranteed to be present, and may not be current if the contact information associated with this number has changed.

Type: TEXT

Value: "lookup_uri"

CACHED_MATCHED_NUMBER

Added in API level 21
static val CACHED_MATCHED_NUMBER: String

The cached phone number of the contact which matches this entry, if it exists.

This value is typically filled in by the dialer app for the caching purpose, so it's not guaranteed to be present, and may not be current if the contact information associated with this number has changed.

Type: TEXT

Value: "matched_number"

CACHED_NAME

Added in API level 1
static val CACHED_NAME: String

The cached name associated with the phone number, if it exists.

This value is typically filled in by the dialer app for the caching purpose, so it's not guaranteed to be present, and may not be current if the contact information associated with this number has changed.

Type: TEXT

Value: "name"

CACHED_NORMALIZED_NUMBER

Added in API level 21
static val CACHED_NORMALIZED_NUMBER: String

The cached normalized(E164) version of the phone number, if it exists.

This value is typically filled in by the dialer app for the caching purpose, so it's not guaranteed to be present, and may not be current if the contact information associated with this number has changed.

Type: TEXT

Value: "normalized_number"

CACHED_NUMBER_LABEL

Added in API level 1
static val CACHED_NUMBER_LABEL: String

The cached number label, for a custom number type, associated with the phone number, if it exists.

This value is typically filled in by the dialer app for the caching purpose, so it's not guaranteed to be present, and may not be current if the contact information associated with this number has changed.

Type: TEXT

Value: "numberlabel"

CACHED_NUMBER_TYPE

Added in API level 1
static val CACHED_NUMBER_TYPE: String

The cached number type (Home, Work, etc) associated with the phone number, if it exists.

This value is typically filled in by the dialer app for the caching purpose, so it's not guaranteed to be present, and may not be current if the contact information associated with this number has changed.

Type: INTEGER

Value: "numbertype"

CACHED_PHOTO_ID

Added in API level 21
static val CACHED_PHOTO_ID: String

The cached photo id of the picture associated with the phone number, if it exists.

This value is typically filled in by the dialer app for the caching purpose, so it's not guaranteed to be present, and may not be current if the contact information associated with this number has changed.

Type: INTEGER (long)

Value: "photo_id"

CACHED_PHOTO_URI

Added in API level 23
static val CACHED_PHOTO_URI: String

The cached photo URI of the picture associated with the phone number, if it exists.

This value is typically filled in by the dialer app for the caching purpose, so it's not guaranteed to be present, and may not be current if the contact information associated with this number has changed.

Type: TEXT (URI)

Value: "photo_uri"

CALL_SCREENING_APP_NAME

Added in API level 29
static val CALL_SCREENING_APP_NAME: String

The name of the app which blocked a call. Will be populated when the CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE. Provided as a convenience so that the call log can still indicate which app blocked a call, even if that app is no longer installed.

Type: TEXT

Value: "call_screening_app_name"

CALL_SCREENING_COMPONENT_NAME

Added in API level 29
static val CALL_SCREENING_COMPONENT_NAME: String

The ComponentName of the CallScreeningService which blocked this call. Will be populated when the CallLog.Calls#TYPE is CallLog.Calls#BLOCKED_TYPE.

Type: TEXT

Value: "call_screening_component_name"

COMPOSER_PHOTO_URI

Added in API level 31
static val COMPOSER_PHOTO_URI: String

A reference to the picture that was sent via call composer. The string contained in this field should be converted to an Uri via Uri#parse(String), then passed to android.content.ContentResolver#openFileDescriptor in order to obtain a file descriptor to access the picture data. The user may choose to delete the picture associated with a call independently of the call log entry, in which case android.content.ContentResolver#openFileDescriptor may throw a FileNotFoundException. Note that pictures sent or received via call composer will not be included in any backups of the call log.

Type: TEXT

Value: "composer_photo_uri"

CONTENT_ITEM_TYPE

Added in API level 1
static val CONTENT_ITEM_TYPE: String

The MIME type of a CONTENT_URI sub-directory of a single call.

Value: "vnd.android.cursor.item/calls"

CONTENT_TYPE

Added in API level 1
static val CONTENT_TYPE: String

The MIME type of CONTENT_URI and CONTENT_FILTER_URI providing a directory of calls.

Value: "vnd.android.cursor.dir/calls"

COUNTRY_ISO

Added in API level 21
static val COUNTRY_ISO: String

The ISO 3166-1 two letters country code of the country where the user received or made the call.

Type: TEXT

Value: "countryiso"

DATA_USAGE

Added in API level 21
static val DATA_USAGE: String

The data usage of the call in bytes.

Type: INTEGER (long)

Value: "data_usage"

DATE

Added in API level 1
static val DATE: String

The date the call occured, in milliseconds since the epoch

Type: INTEGER (long)

Value: "date"

DEFAULT_SORT_ORDER

Added in API level 1
static val DEFAULT_SORT_ORDER: String

The default sort order for this table

Value: "date DESC"

DURATION

Added in API level 1
static val DURATION: String

The duration of the call in seconds

Type: INTEGER (long)

Value: "duration"

EXTRA_CALL_TYPE_FILTER

Added in API level 21
static val EXTRA_CALL_TYPE_FILTER: String

An optional extra used with Calls.CONTENT_TYPE and Intent#ACTION_VIEW to specify that the presented list of calls should be filtered for a particular call type. Applications implementing a call log UI should check for this extra, and display a filtered list of calls based on the specified call type. If not applicable within the application's UI, it should be silently ignored.

The following example brings up the call log, showing only missed calls.

Intent intent = new Intent(Intent.ACTION_VIEW);
  intent.setType(CallLog.Calls.CONTENT_TYPE);
  intent.putExtra(CallLog.Calls.EXTRA_CALL_TYPE_FILTER, CallLog.Calls.MISSED_TYPE);
  startActivity(intent);
  

Value: "android.provider.extra.CALL_TYPE_FILTER"

FEATURES

Added in API level 21
static val FEATURES: String

Bit-mask describing features of the call (e.g. video).

Type: INTEGER (int)

Value: "features"

FEATURES_ASSISTED_DIALING_USED

Added in API level 30
static val FEATURES_ASSISTED_DIALING_USED: Int

Indicates the call underwent Assisted Dialing.

Value: 16

FEATURES_HD_CALL

Added in API level 26
static val FEATURES_HD_CALL: Int

Call was HD.

Value: 4

FEATURES_PULLED_EXTERNALLY

Added in API level 25
static val FEATURES_PULLED_EXTERNALLY: Int

Call was pulled externally.

Value: 2

FEATURES_RTT

Added in API level 28
static val FEATURES_RTT: Int

Call was on RTT at some point

Value: 32

FEATURES_VIDEO

Added in API level 21
static val FEATURES_VIDEO: Int

Call had video.

Value: 1

FEATURES_VOLTE

Added in API level 30
static val FEATURES_VOLTE: Int

Call was VoLTE

Value: 64

FEATURES_WIFI

Added in API level 26
static val FEATURES_WIFI: Int

Call was WIFI call.

Value: 8

GEOCODED_LOCATION

Added in API level 21
static val GEOCODED_LOCATION: String

A geocoded location for the number associated with this call.

The string represents a city, state, or country associated with the number.

Type: TEXT

Value: "geocoded_location"

INCOMING_TYPE

Added in API level 1
static val INCOMING_TYPE: Int

Call log type for incoming calls.

Value: 1

IS_BUSINESS_CALL

Added in API level 35
static val IS_BUSINESS_CALL: String

Boolean indicating whether the call is a business call.

Value: "is_business_call"

IS_READ

Added in API level 14
static val IS_READ: String

Whether this item has been read or otherwise consumed by the user.

Unlike the NEW field, which requires the user to have acknowledged the existence of the entry, this implies the user has interacted with the entry.

Type: INTEGER (boolean)

Value: "is_read"

LAST_MODIFIED

Added in API level 24
static val LAST_MODIFIED: String

The date the row is last inserted, updated, or marked as deleted, in milliseconds since the epoch. Read only.

Type: INTEGER (long)

Value: "last_modified"

LIMIT_PARAM_KEY

Added in API level 17
static val LIMIT_PARAM_KEY: String

Query parameter used to limit the number of call logs returned.

TYPE: integer

Value: "limit"

LOCATION

Added in API level 31
static val LOCATION: String

A reference to the location that was sent via call composer. This column contains the content URI of the corresponding entry in Locations table, which contains the actual location data. The Manifest.permission#ACCESS_FINE_LOCATION permission is required to access that table. If your app has the appropriate permissions, the location data may be obtained by converting the value of this column to an Uri via Uri#parse, then passing the result to android.content.ContentResolver#query. The user may choose to delete the location associated with a call independently of the call log entry, in which case the Cursor returned from android.content.ContentResolver#query will either be null or empty, with Cursor#getCount() returning 0. This column will not be populated when a call is received while the device is locked, and it will not be part of any backups.

Type: TEXT

Value: "location"

MISSED_REASON

Added in API level 31
static val MISSED_REASON: String

Where the CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE, indicates factors which may have lead the user to miss the call.

Type: INTEGER

There are two main cases. Auto missed cases and user missed cases. Default value is:

Auto missed cases are those where a call was missed because it was not possible for the incoming call to be presented to the user at all. Possible values are:

User missed cases are those where the incoming call was presented to the user, but factors such as a low ringing volume may have contributed to the call being missed. Following bits can be set to indicate possible reasons for this:

Value: "missed_reason"

MISSED_REASON_NOT_MISSED

Added in API level 31
static val MISSED_REASON_NOT_MISSED: Long

Value for CallLog.Calls#MISSED_REASON, set as the default value when a call was not missed.

Value: 0L

MISSED_TYPE

Added in API level 1
static val MISSED_TYPE: Int

Call log type for missed calls.

Value: 3

NEW

Added in API level 1
static val NEW: String

Whether or not the call has been acknowledged

Type: INTEGER (boolean)

Value: "new"

NUMBER

Added in API level 1
static val NUMBER: String

The phone number as the user entered it.

Type: TEXT

Value: "number"

NUMBER_PRESENTATION

Added in API level 19
static val NUMBER_PRESENTATION: String

The number presenting rules set by the network.

Allowed values:

Type: INTEGER

Value: "presentation"

OFFSET_PARAM_KEY

Added in API level 17
static val OFFSET_PARAM_KEY: String

Query parameter used to specify the starting record to return.

TYPE: integer

Value: "offset"

OUTGOING_TYPE

Added in API level 1
static val OUTGOING_TYPE: Int

Call log type for outgoing calls.

Value: 2

PHONE_ACCOUNT_COMPONENT_NAME

Added in API level 21
static val PHONE_ACCOUNT_COMPONENT_NAME: String

The component name of the account used to place or receive the call; in string form.

Type: TEXT

Value: "subscription_component_name"

PHONE_ACCOUNT_ID

Added in API level 21
static val PHONE_ACCOUNT_ID: String

The identifier for the account used to place or receive the call.

Type: TEXT

Value: "subscription_id"

POST_DIAL_DIGITS

Added in API level 24
static val POST_DIAL_DIGITS: String

The post-dial portion of a dialed number, including any digits dialed after a TelecomManager#DTMF_CHARACTER_PAUSE or a android.telecom.TelecomManager#DTMF_CHARACTER_WAIT and these characters themselves.

Type: TEXT

Value: "post_dial_digits"

PRESENTATION_ALLOWED

Added in API level 19
static val PRESENTATION_ALLOWED: Int

Number is allowed to display for caller id.

Value: 1

PRESENTATION_PAYPHONE

Added in API level 19
static val PRESENTATION_PAYPHONE: Int

Number is a pay phone.

Value: 4

PRESENTATION_RESTRICTED

Added in API level 19
static val PRESENTATION_RESTRICTED: Int

Number is blocked by user.

Value: 2

PRESENTATION_UNAVAILABLE

Added in API level 33
static val PRESENTATION_UNAVAILABLE: Int

Number is unavailable.

Value: 5

PRESENTATION_UNKNOWN

Added in API level 19
static val PRESENTATION_UNKNOWN: Int

Number is not specified or unknown by network.

Value: 3

PRIORITY

Added in API level 31
static val PRIORITY: String

The priority of the call, as delivered via call composer. For outgoing calls, contains the priority set by the local user. For incoming calls, contains the priority set by the remote caller. If no priority was set or the call did not include call composer elements, defaults to PRIORITY_NORMAL. Valid values are PRIORITY_NORMAL and PRIORITY_URGENT.

Type: INTEGER

Value: "priority"

PRIORITY_NORMAL

Added in API level 31
static val PRIORITY_NORMAL: Int

Used as a value in the PRIORITY column. Indicates that the call is of normal priority. This is also the default value for calls that did not include call composer elements.

Value: 0

PRIORITY_URGENT

Added in API level 31
static val PRIORITY_URGENT: Int

Used as a value in the PRIORITY column. Indicates that the call is of urgent priority.

Value: 1

REJECTED_TYPE

Added in API level 24
static val REJECTED_TYPE: Int

Call log type for calls rejected by direct user action.

Value: 5

SUBJECT

Added in API level 31
static val SUBJECT: String

The subject of the call, as delivered via call composer. For outgoing calls, contains the subject set by the local user. For incoming calls, contains the subject set by the remote caller. May be null if no subject was set.

Type: TEXT

Value: "subject"

TRANSCRIPTION

Added in API level 21
static val TRANSCRIPTION: String

Transcription of the call or voicemail entry. This will only be populated for call log entries of type VOICEMAIL_TYPE that have valid transcriptions.

Value: "transcription"

TYPE

Added in API level 1
static val TYPE: String

The type of the call (incoming, outgoing or missed).

Type: INTEGER (int)

Allowed values:

Value: "type"

USER_MISSED_CALL_FILTERS_TIMEOUT

Added in API level 31
static val USER_MISSED_CALL_FILTERS_TIMEOUT: Long

When CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE, set this bit when the call filters timed out.

Value: 4194304L

USER_MISSED_CALL_SCREENING_SERVICE_SILENCED

Added in API level 31
static val USER_MISSED_CALL_SCREENING_SERVICE_SILENCED: Long

When CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE, set this bit when this call is silenced by the call screening service.

Value: 2097152L

USER_MISSED_DND_MODE

Added in API level 31
static val USER_MISSED_DND_MODE: Long

When CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE, set this bit when this call is silenced because the phone is in 'do not disturb mode'.

Value: 262144L

USER_MISSED_LOW_RING_VOLUME

Added in API level 31
static val USER_MISSED_LOW_RING_VOLUME: Long

When CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE, set this bit when this call rings with a low ring volume.

Value: 524288L

USER_MISSED_NO_ANSWER

Added in API level 31
static val USER_MISSED_NO_ANSWER: Long

When CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE, set this bit when the call was missed just because user didn't answer it.

Value: 65536L

USER_MISSED_NO_VIBRATE

Added in API level 31
static val USER_MISSED_NO_VIBRATE: Long

When CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE set this bit when this call rings without vibration.

Value: 1048576L

USER_MISSED_SHORT_RING

Added in API level 31
static val USER_MISSED_SHORT_RING: Long

When CallLog.Calls#TYPE is CallLog.Calls#MISSED_TYPE, set this bit when this call rang for a short period of time.

Value: 131072L

VIA_NUMBER

Added in API level 24
static val VIA_NUMBER: String

For an incoming call, the secondary line number the call was received via. When a SIM card has multiple phone numbers associated with it, the via number indicates which of the numbers associated with the SIM was called.

Value: "via_number"

VOICEMAIL_TYPE

Added in API level 21
static val VOICEMAIL_TYPE: Int

Call log type for voicemails.

Value: 4

VOICEMAIL_URI

Added in API level 21
static val VOICEMAIL_URI: String

URI of the voicemail entry. Populated only for VOICEMAIL_TYPE.

Type: TEXT

Value: "voicemail_uri"

Public constructors

Calls

Calls()

Public methods

getLastOutgoingCall

Added in API level 8
open static fun getLastOutgoingCall(context: Context!): String!

Query the call log database for the last dialed number.

Parameters
context Context!: Used to get the content resolver.
Return
String! The last phone number dialed (outgoing) or an empty string if none exist yet.

Properties

CONTENT_FILTER_URI

Added in API level 1
static val CONTENT_FILTER_URI: Uri!

The content:// style URL for filtering this table on phone numbers

CONTENT_URI

Added in API level 1
static val CONTENT_URI: Uri!

The content:// style URL for this table

CONTENT_URI_WITH_VOICEMAIL

Added in API level 21
static val CONTENT_URI_WITH_VOICEMAIL: Uri!

Content uri used to access call log entries, including voicemail records. You must have the READ_CALL_LOG and WRITE_CALL_LOG permissions to read and write to the call log, as well as READ_VOICEMAIL and WRITE_VOICEMAIL permissions to read and write voicemails.