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 |
static Long |
Value for |
static Long |
Value for |
static Int |
Call log type for calls blocked automatically. |
static String |
Where the |
static Int |
Value for |
static Int |
Value for |
static Int |
Value for |
static Int |
Value for |
static Int |
Value for |
static Int |
Value for |
static Int |
Value for |
static Int |
Value for |
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 |
static String |
The MIME type of |
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 |
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 |
static Long |
Value for |
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 |
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 |
static Int |
Used as a value in the |
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 |
static Long |
When |
static Long |
When |
static Long |
When |
static Long |
When |
static Long |
When |
static Long |
When |
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 | |
---|---|
Calls() |
Public methods | |
---|---|
open static String! |
getLastOutgoingCall(context: Context!) 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
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
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
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
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
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
static val BLOCKED_TYPE: Int
Call log type for calls blocked automatically.
Value: 6
BLOCK_REASON
static val BLOCK_REASON: String
Where the CallLog.Calls.TYPE
is CallLog.Calls.BLOCKED_TYPE
, indicates the reason why a call is blocked.
Type: INTEGER
Allowed values:
CallLog.Calls.BLOCK_REASON_NOT_BLOCKED
CallLog.Calls.BLOCK_REASON_CALL_SCREENING_SERVICE
CallLog.Calls.BLOCK_REASON_DIRECT_TO_VOICEMAIL
CallLog.Calls.BLOCK_REASON_BLOCKED_NUMBER
CallLog.Calls.BLOCK_REASON_UNKNOWN_NUMBER
CallLog.Calls.BLOCK_REASON_RESTRICTED_NUMBER
CallLog.Calls.BLOCK_REASON_PAY_PHONE
CallLog.Calls.BLOCK_REASON_NOT_IN_CONTACTS
Value: "block_reason"
BLOCK_REASON_BLOCKED_NUMBER
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
static val DATA_USAGE: String
The data usage of the call in bytes.
Type: INTEGER (long)
Value: "data_usage"
DATE
static val DATE: String
The date the call occured, in milliseconds since the epoch
Type: INTEGER (long)
Value: "date"
DEFAULT_SORT_ORDER
static val DEFAULT_SORT_ORDER: String
The default sort order for this table
Value: "date DESC"
DURATION
static val DURATION: String
The duration of the call in seconds
Type: INTEGER (long)
Value: "duration"
EXTRA_CALL_TYPE_FILTER
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
static val FEATURES: String
Bit-mask describing features of the call (e.g. video).
Type: INTEGER (int)
Value: "features"
FEATURES_ASSISTED_DIALING_USED
static val FEATURES_ASSISTED_DIALING_USED: Int
Indicates the call underwent Assisted Dialing.
Value: 16
FEATURES_PULLED_EXTERNALLY
static val FEATURES_PULLED_EXTERNALLY: Int
Call was pulled externally.
Value: 2
FEATURES_RTT
static val FEATURES_RTT: Int
Call was on RTT at some point
Value: 32
GEOCODED_LOCATION
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
static val INCOMING_TYPE: Int
Call log type for incoming calls.
Value: 1
IS_BUSINESS_CALL
static val IS_BUSINESS_CALL: String
Boolean indicating whether the call is a business call.
Value: "is_business_call"
IS_READ
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
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
static val LIMIT_PARAM_KEY: String
Query parameter used to limit the number of call logs returned.
TYPE: integer
Value: "limit"
LOCATION
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
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:
CallLog.Calls.AUTO_MISSED_EMERGENCY_CALL
CallLog.Calls.AUTO_MISSED_MAXIMUM_RINGING
CallLog.Calls.AUTO_MISSED_MAXIMUM_DIALING
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:
CallLog.Calls.USER_MISSED_SHORT_RING
CallLog.Calls.USER_MISSED_DND_MODE
CallLog.Calls.USER_MISSED_LOW_RING_VOLUME
CallLog.Calls.USER_MISSED_NO_VIBRATE
CallLog.Calls.USER_MISSED_CALL_SCREENING_SERVICE_SILENCED
CallLog.Calls.USER_MISSED_CALL_FILTERS_TIMEOUT
Value: "missed_reason"
MISSED_REASON_NOT_MISSED
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
static val MISSED_TYPE: Int
Call log type for missed calls.
Value: 3
NEW
static val NEW: String
Whether or not the call has been acknowledged
Type: INTEGER (boolean)
Value: "new"
NUMBER
static val NUMBER: String
The phone number as the user entered it.
Type: TEXT
Value: "number"
NUMBER_PRESENTATION
static val NUMBER_PRESENTATION: String
The number presenting rules set by the network.
Allowed values:
PRESENTATION_ALLOWED
PRESENTATION_RESTRICTED
PRESENTATION_UNKNOWN
PRESENTATION_PAYPHONE
PRESENTATION_UNAVAILABLE
Type: INTEGER
Value: "presentation"
OFFSET_PARAM_KEY
static val OFFSET_PARAM_KEY: String
Query parameter used to specify the starting record to return.
TYPE: integer
Value: "offset"
OUTGOING_TYPE
static val OUTGOING_TYPE: Int
Call log type for outgoing calls.
Value: 2
PHONE_ACCOUNT_COMPONENT_NAME
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
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
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
static val PRESENTATION_ALLOWED: Int
Number is allowed to display for caller id.
Value: 1
PRESENTATION_PAYPHONE
static val PRESENTATION_PAYPHONE: Int
Number is a pay phone.
Value: 4
PRESENTATION_RESTRICTED
static val PRESENTATION_RESTRICTED: Int
Number is blocked by user.
Value: 2
PRESENTATION_UNAVAILABLE
static val PRESENTATION_UNAVAILABLE: Int
Number is unavailable.
Value: 5
PRESENTATION_UNKNOWN
static val PRESENTATION_UNKNOWN: Int
Number is not specified or unknown by network.
Value: 3
PRIORITY
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
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
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
static val REJECTED_TYPE: Int
Call log type for calls rejected by direct user action.
Value: 5
SUBJECT
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
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
static val TYPE: String
The type of the call (incoming, outgoing or missed).
Type: INTEGER (int)
Allowed values:
INCOMING_TYPE
OUTGOING_TYPE
MISSED_TYPE
VOICEMAIL_TYPE
REJECTED_TYPE
BLOCKED_TYPE
ANSWERED_EXTERNALLY_TYPE
Value: "type"
USER_MISSED_CALL_FILTERS_TIMEOUT
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
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
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
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
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
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
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
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
static val VOICEMAIL_TYPE: Int
Call log type for voicemails.
Value: 4
VOICEMAIL_URI
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
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
static val CONTENT_FILTER_URI: Uri!
The content:// style URL for filtering this table on phone numbers
CONTENT_URI
static val CONTENT_URI: Uri!
The content:// style URL for this table
CONTENT_URI_WITH_VOICEMAIL
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.