CallLog.Calls
public
static
class
CallLog.Calls
extends Object
implements
BaseColumns
| java.lang.Object | |
| ↳ | android.provider.CallLog.Calls |
Contains the recent calls.
Summary
Constants | |
|---|---|
int |
ANSWERED_EXTERNALLY_TYPE
Call log type for a call which was answered on another device. |
int |
BLOCKED_TYPE
Call log type for calls blocked automatically. |
String |
CACHED_FORMATTED_NUMBER
The cached phone number, formatted with formatting rules based on the country the user was in when the call was made or received. |
String |
CACHED_LOOKUP_URI
The cached URI to look up the contact associated with the phone number, if it exists. |
String |
CACHED_MATCHED_NUMBER
The cached phone number of the contact which matches this entry, if it exists. |
String |
CACHED_NAME
The cached name associated with the phone number, if it exists. |
String |
CACHED_NORMALIZED_NUMBER
The cached normalized(E164) version of the phone number, if it exists. |
String |
CACHED_NUMBER_LABEL
The cached number label, for a custom number type, associated with the phone number, if it exists. |
String |
CACHED_NUMBER_TYPE
The cached number type (Home, Work, etc) associated with the phone number, if it exists. |
String |
CACHED_PHOTO_ID
The cached photo id of the picture associated with the phone number, if it exists. |
String |
CACHED_PHOTO_URI
The cached photo URI of the picture associated with the phone number, if it exists. |
String |
CONTENT_ITEM_TYPE
The MIME type of a |
String |
CONTENT_TYPE
The MIME type of |
String |
COUNTRY_ISO
The ISO 3166-1 two letters country code of the country where the user received or made the call. |
String |
DATA_USAGE
The data usage of the call in bytes. |
String |
DATE
The date the call occured, in milliseconds since the epoch Type: INTEGER (long) |
String |
DEFAULT_SORT_ORDER
The default sort order for this table |
String |
DURATION
The duration of the call in seconds Type: INTEGER (long) |
String |
EXTRA_CALL_TYPE_FILTER
An optional extra used with |
String |
FEATURES
Bit-mask describing features of the call (e.g. |
int |
FEATURES_HD_CALL
Call was HD. |
int |
FEATURES_PULLED_EXTERNALLY
Call was pulled externally. |
int |
FEATURES_VIDEO
Call had video. |
int |
FEATURES_WIFI
Call was WIFI call. |
String |
GEOCODED_LOCATION
A geocoded location for the number associated with this call. |
int |
INCOMING_TYPE
Call log type for incoming calls. |
String |
IS_READ
Whether this item has been read or otherwise consumed by the user. |
String |
LAST_MODIFIED
The date the row is last inserted, updated, or marked as deleted, in milliseconds since the epoch. |
String |
LIMIT_PARAM_KEY
Query parameter used to limit the number of call logs returned. |
int |
MISSED_TYPE
Call log type for missed calls. |
String |
NEW
Whether or not the call has been acknowledged Type: INTEGER (boolean) |
String |
NUMBER
The phone number as the user entered it. |
String |
NUMBER_PRESENTATION
The number presenting rules set by the network. |
String |
OFFSET_PARAM_KEY
Query parameter used to specify the starting record to return. |
int |
OUTGOING_TYPE
Call log type for outgoing calls. |
String |
PHONE_ACCOUNT_COMPONENT_NAME
The component name of the account used to place or receive the call; in string form. |
String |
PHONE_ACCOUNT_ID
The identifier for the account used to place or receive the call. |
String |
POST_DIAL_DIGITS
The post-dial portion of a dialed number, including any digits dialed after a
|
int |
PRESENTATION_ALLOWED
Number is allowed to display for caller id. |
int |
PRESENTATION_PAYPHONE
Number is a pay phone. |
int |
PRESENTATION_RESTRICTED
Number is blocked by user. |
int |
PRESENTATION_UNKNOWN
Number is not specified or unknown by network. |
int |
REJECTED_TYPE
Call log type for calls rejected by direct user action. |
String |
TRANSCRIPTION
Transcription of the call or voicemail entry. |
String |
TYPE
The type of the call (incoming, outgoing or missed). |
String |
VIA_NUMBER
For an incoming call, the secondary line number the call was received via. |
int |
VOICEMAIL_TYPE
Call log type for voicemails. |
String |
VOICEMAIL_URI
URI of the voicemail entry. |
Inherited constants |
|---|
android.provider.BaseColumns
|
Fields | |
|---|---|
public
static
final
Uri |
CONTENT_FILTER_URI
The content:// style URL for filtering this table on phone numbers |
public
static
final
Uri |
CONTENT_URI
The content:// style URL for this table |
public
static
final
Uri |
CONTENT_URI_WITH_VOICEMAIL
Content uri used to access call log entries, including voicemail records. |
Public constructors | |
|---|---|
CallLog.Calls()
|
|
Public methods | |
|---|---|
static
String
|
getLastOutgoingCall(Context context)
Query the call log database for the last dialed number. |
Inherited methods | |
|---|---|
java.lang.Object
| |
Constants
ANSWERED_EXTERNALLY_TYPE
int ANSWERED_EXTERNALLY_TYPE
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.
Constant Value: 7 (0x00000007)
BLOCKED_TYPE
int BLOCKED_TYPE
Call log type for calls blocked automatically.
Constant Value: 6 (0x00000006)
CACHED_FORMATTED_NUMBER
String CACHED_FORMATTED_NUMBER
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
Constant Value: "formatted_number"
CACHED_LOOKUP_URI
String CACHED_LOOKUP_URI
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
Constant Value: "lookup_uri"
CACHED_MATCHED_NUMBER
String CACHED_MATCHED_NUMBER
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
Constant Value: "matched_number"
CACHED_NAME
String CACHED_NAME
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
Constant Value: "name"
CACHED_NORMALIZED_NUMBER
String CACHED_NORMALIZED_NUMBER
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
Constant Value: "normalized_number"
CACHED_NUMBER_LABEL
String CACHED_NUMBER_LABEL
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
Constant Value: "numberlabel"
CACHED_NUMBER_TYPE
String CACHED_NUMBER_TYPE
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
Constant Value: "numbertype"
CACHED_PHOTO_ID
String CACHED_PHOTO_ID
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)
Constant Value: "photo_id"
CACHED_PHOTO_URI
String CACHED_PHOTO_URI
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)
Constant Value: "photo_uri"
CONTENT_ITEM_TYPE
String CONTENT_ITEM_TYPE
The MIME type of a CONTENT_URI sub-directory of a single
call.
Constant Value: "vnd.android.cursor.item/calls"
CONTENT_TYPE
String CONTENT_TYPE
The MIME type of CONTENT_URI and CONTENT_FILTER_URI
providing a directory of calls.
Constant Value: "vnd.android.cursor.dir/calls"
COUNTRY_ISO
String COUNTRY_ISO
The ISO 3166-1 two letters country code of the country where the user received or made the call.
Type: TEXT
Constant Value: "countryiso"
DATA_USAGE
String DATA_USAGE
The data usage of the call in bytes.
Type: INTEGER (long)
Constant Value: "data_usage"
DATE
String DATE
The date the call occured, in milliseconds since the epoch
Type: INTEGER (long)
Constant Value: "date"
DEFAULT_SORT_ORDER
String DEFAULT_SORT_ORDER
The default sort order for this table
Constant Value: "date DESC"
DURATION
String DURATION
The duration of the call in seconds
Type: INTEGER (long)
Constant Value: "duration"
EXTRA_CALL_TYPE_FILTER
String EXTRA_CALL_TYPE_FILTER
An optional extra used with Calls.CONTENT_TYPE and
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);
Constant Value: "android.provider.extra.CALL_TYPE_FILTER"
FEATURES
String FEATURES
Bit-mask describing features of the call (e.g. video).
Type: INTEGER (int)
Constant Value: "features"
FEATURES_HD_CALL
int FEATURES_HD_CALL
Call was HD.
Constant Value: 4 (0x00000004)
FEATURES_PULLED_EXTERNALLY
int FEATURES_PULLED_EXTERNALLY
Call was pulled externally.
Constant Value: 2 (0x00000002)
FEATURES_VIDEO
int FEATURES_VIDEO
Call had video.
Constant Value: 1 (0x00000001)
FEATURES_WIFI
int FEATURES_WIFI
Call was WIFI call.
Constant Value: 8 (0x00000008)
GEOCODED_LOCATION
String GEOCODED_LOCATION
A geocoded location for the number associated with this call.
The string represents a city, state, or country associated with the number.
Type: TEXT
Constant Value: "geocoded_location"
INCOMING_TYPE
int INCOMING_TYPE
Call log type for incoming calls.
Constant Value: 1 (0x00000001)
IS_READ
String IS_READ
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)
Constant Value: "is_read"
LAST_MODIFIED
String LAST_MODIFIED
The date the row is last inserted, updated, or marked as deleted, in milliseconds since the epoch. Read only.
Type: INTEGER (long)
Constant Value: "last_modified"
LIMIT_PARAM_KEY
String LIMIT_PARAM_KEY
Query parameter used to limit the number of call logs returned.
TYPE: integer
Constant Value: "limit"
MISSED_TYPE
int MISSED_TYPE
Call log type for missed calls.
Constant Value: 3 (0x00000003)
NEW
String NEW
Whether or not the call has been acknowledged
Type: INTEGER (boolean)
Constant Value: "new"
NUMBER
String NUMBER
The phone number as the user entered it.
Type: TEXT
Constant Value: "number"
NUMBER_PRESENTATION
String NUMBER_PRESENTATION
The number presenting rules set by the network.
Allowed values:
Type: INTEGER
Constant Value: "presentation"
OFFSET_PARAM_KEY
String OFFSET_PARAM_KEY
Query parameter used to specify the starting record to return.
TYPE: integer
Constant Value: "offset"
OUTGOING_TYPE
int OUTGOING_TYPE
Call log type for outgoing calls.
Constant Value: 2 (0x00000002)
PHONE_ACCOUNT_COMPONENT_NAME
String PHONE_ACCOUNT_COMPONENT_NAME
The component name of the account used to place or receive the call; in string form.
Type: TEXT
Constant Value: "subscription_component_name"
PHONE_ACCOUNT_ID
String PHONE_ACCOUNT_ID
The identifier for the account used to place or receive the call.
Type: TEXT
Constant Value: "subscription_id"
POST_DIAL_DIGITS
String POST_DIAL_DIGITS
The post-dial portion of a dialed number, including any digits dialed after a
DTMF_CHARACTER_PAUSE or a DTMF_CHARACTER_WAIT and these characters themselves.
Type: TEXT
Constant Value: "post_dial_digits"
PRESENTATION_ALLOWED
int PRESENTATION_ALLOWED
Number is allowed to display for caller id.
Constant Value: 1 (0x00000001)
PRESENTATION_PAYPHONE
int PRESENTATION_PAYPHONE
Number is a pay phone.
Constant Value: 4 (0x00000004)
PRESENTATION_RESTRICTED
int PRESENTATION_RESTRICTED
Number is blocked by user.
Constant Value: 2 (0x00000002)
PRESENTATION_UNKNOWN
int PRESENTATION_UNKNOWN
Number is not specified or unknown by network.
Constant Value: 3 (0x00000003)
REJECTED_TYPE
int REJECTED_TYPE
Call log type for calls rejected by direct user action.
Constant Value: 5 (0x00000005)
TRANSCRIPTION
String TRANSCRIPTION
Transcription of the call or voicemail entry. This will only be populated for call log
entries of type VOICEMAIL_TYPE that have valid transcriptions.
Constant Value: "transcription"
TYPE
String TYPE
The type of the call (incoming, outgoing or missed).
Type: INTEGER (int)
Allowed values:
INCOMING_TYPEOUTGOING_TYPEMISSED_TYPEVOICEMAIL_TYPEREJECTED_TYPEBLOCKED_TYPEANSWERED_EXTERNALLY_TYPE
Constant Value: "type"
VIA_NUMBER
String VIA_NUMBER
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.
Constant Value: "via_number"
VOICEMAIL_TYPE
int VOICEMAIL_TYPE
Call log type for voicemails.
Constant Value: 4 (0x00000004)
VOICEMAIL_URI
String VOICEMAIL_URI
URI of the voicemail entry. Populated only for VOICEMAIL_TYPE.
Type: TEXT
Constant Value: "voicemail_uri"
Fields
CONTENT_FILTER_URI
Uri CONTENT_FILTER_URI
The content:// style URL for filtering this table on phone numbers
CONTENT_URI_WITH_VOICEMAIL
Uri CONTENT_URI_WITH_VOICEMAIL
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.
Public constructors
Public methods
getLastOutgoingCall
String getLastOutgoingCall (Context context)
Query the call log database for the last dialed number.
| Parameters | |
|---|---|
context |
Context: Used to get the content resolver. |
| Returns | |
|---|---|
String |
The last phone number dialed (outgoing) or an empty string if none exist yet. |
Interfaces
- BaseColumns
- CalendarContract.AttendeesColumns
- CalendarContract.CalendarAlertsColumns
- CalendarContract.CalendarCacheColumns
- CalendarContract.CalendarColumns
- CalendarContract.CalendarSyncColumns
- CalendarContract.ColorsColumns
- CalendarContract.EventDaysColumns
- CalendarContract.EventsColumns
- CalendarContract.ExtendedPropertiesColumns
- CalendarContract.RemindersColumns
- CalendarContract.SyncColumns
- Contacts.ContactMethodsColumns
- Contacts.ExtensionsColumns
- Contacts.GroupsColumns
- Contacts.OrganizationColumns
- Contacts.PeopleColumns
- Contacts.PhonesColumns
- Contacts.PhotosColumns
- Contacts.PresenceColumns
- Contacts.SettingsColumns
- ContactsContract.BaseSyncColumns
- ContactsContract.CommonDataKinds.BaseTypes
- ContactsContract.CommonDataKinds.CommonColumns
- ContactsContract.ContactNameColumns
- ContactsContract.ContactOptionsColumns
- ContactsContract.ContactsColumns
- ContactsContract.ContactStatusColumns
- ContactsContract.DataColumns
- ContactsContract.DataColumnsWithJoins
- ContactsContract.DataUsageStatColumns
- ContactsContract.DeletedContactsColumns
- ContactsContract.DisplayNameSources
- ContactsContract.FullNameStyle
- ContactsContract.GroupsColumns
- ContactsContract.PhoneLookupColumns
- ContactsContract.PhoneticNameStyle
- ContactsContract.PresenceColumns
- ContactsContract.RawContactsColumns
- ContactsContract.SettingsColumns
- ContactsContract.StatusColumns
- ContactsContract.SyncColumns
- MediaStore.Audio.AlbumColumns
- MediaStore.Audio.ArtistColumns
- MediaStore.Audio.AudioColumns
- MediaStore.Audio.GenresColumns
- MediaStore.Audio.PlaylistsColumns
- MediaStore.Files.FileColumns
- MediaStore.Images.ImageColumns
- MediaStore.MediaColumns
- MediaStore.Video.VideoColumns
- OpenableColumns
- SyncStateContract.Columns
- Telephony.BaseMmsColumns
- Telephony.CanonicalAddressesColumns
- Telephony.TextBasedSmsColumns
- Telephony.ThreadsColumns
Classes
- AlarmClock
- BlockedNumberContract
- BlockedNumberContract.BlockedNumbers
- Browser
- CalendarContract
- CalendarContract.Attendees
- CalendarContract.CalendarAlerts
- CalendarContract.CalendarCache
- CalendarContract.CalendarEntity
- CalendarContract.Calendars
- CalendarContract.Colors
- CalendarContract.EventDays
- CalendarContract.Events
- CalendarContract.EventsEntity
- CalendarContract.ExtendedProperties
- CalendarContract.Instances
- CalendarContract.Reminders
- CalendarContract.SyncState
- CallLog
- CallLog.Calls
- Contacts
- Contacts.ContactMethods
- Contacts.Extensions
- Contacts.GroupMembership
- Contacts.Groups
- Contacts.Intents
- Contacts.Intents.Insert
- Contacts.Intents.UI
- Contacts.Organizations
- Contacts.People
- Contacts.People.ContactMethods
- Contacts.People.Extensions
- Contacts.People.Phones
- Contacts.Phones
- Contacts.Photos
- Contacts.Settings
- ContactsContract
- ContactsContract.AggregationExceptions
- ContactsContract.CommonDataKinds
- ContactsContract.CommonDataKinds.Callable
- ContactsContract.CommonDataKinds.Contactables
- ContactsContract.CommonDataKinds.Email
- ContactsContract.CommonDataKinds.Event
- ContactsContract.CommonDataKinds.GroupMembership
- ContactsContract.CommonDataKinds.Identity
- ContactsContract.CommonDataKinds.Im
- ContactsContract.CommonDataKinds.Nickname
- ContactsContract.CommonDataKinds.Note
- ContactsContract.CommonDataKinds.Organization
- ContactsContract.CommonDataKinds.Phone
- ContactsContract.CommonDataKinds.Photo
- ContactsContract.CommonDataKinds.Relation
- ContactsContract.CommonDataKinds.SipAddress
- ContactsContract.CommonDataKinds.StructuredName
- ContactsContract.CommonDataKinds.StructuredPostal
- ContactsContract.CommonDataKinds.Website
- ContactsContract.Contacts
- ContactsContract.Contacts.AggregationSuggestions
- ContactsContract.Contacts.AggregationSuggestions.Builder
- ContactsContract.Contacts.Data
- ContactsContract.Contacts.Entity
- ContactsContract.Contacts.Photo
- ContactsContract.Data
- ContactsContract.DataUsageFeedback
- ContactsContract.DeletedContacts
- ContactsContract.Directory
- ContactsContract.DisplayPhoto
- ContactsContract.Groups
- ContactsContract.Intents
- ContactsContract.Intents.Insert
- ContactsContract.PhoneLookup
- ContactsContract.PinnedPositions
- ContactsContract.Presence
- ContactsContract.Profile
- ContactsContract.ProfileSyncState
- ContactsContract.ProviderStatus
- ContactsContract.QuickContact
- ContactsContract.RawContacts
- ContactsContract.RawContacts.Data
- ContactsContract.RawContacts.DisplayPhoto
- ContactsContract.RawContacts.Entity
- ContactsContract.RawContactsEntity
- ContactsContract.SearchSnippets
- ContactsContract.Settings
- ContactsContract.StatusUpdates
- ContactsContract.SyncState
- DocumentsContract
- DocumentsContract.Document
- DocumentsContract.Path
- DocumentsContract.Root
- DocumentsProvider
- FontRequest
- FontsContract
- FontsContract.Columns
- FontsContract.FontFamilyResult
- FontsContract.FontInfo
- FontsContract.FontRequestCallback
- LiveFolders
- MediaStore
- MediaStore.Audio
- MediaStore.Audio.Albums
- MediaStore.Audio.Artists
- MediaStore.Audio.Artists.Albums
- MediaStore.Audio.Genres
- MediaStore.Audio.Genres.Members
- MediaStore.Audio.Media
- MediaStore.Audio.Playlists
- MediaStore.Audio.Playlists.Members
- MediaStore.Audio.Radio
- MediaStore.Files
- MediaStore.Images
- MediaStore.Images.Media
- MediaStore.Images.Thumbnails
- MediaStore.Video
- MediaStore.Video.Media
- MediaStore.Video.Thumbnails
- SearchRecentSuggestions
- Settings
- Settings.Global
- Settings.NameValueTable
- Settings.Secure
- Settings.System
- SyncStateContract
- SyncStateContract.Constants
- SyncStateContract.Helpers
- Telephony
- Telephony.Carriers
- Telephony.Mms
- Telephony.Mms.Addr
- Telephony.Mms.Draft
- Telephony.Mms.Inbox
- Telephony.Mms.Intents
- Telephony.Mms.Outbox
- Telephony.Mms.Part
- Telephony.Mms.Rate
- Telephony.Mms.Sent
- Telephony.MmsSms
- Telephony.MmsSms.PendingMessages
- Telephony.ServiceStateTable
- Telephony.Sms
- Telephony.Sms.Conversations
- Telephony.Sms.Draft
- Telephony.Sms.Inbox
- Telephony.Sms.Intents
- Telephony.Sms.Outbox
- Telephony.Sms.Sent
- Telephony.Threads
- UserDictionary
- UserDictionary.Words
- VoicemailContract
- VoicemailContract.Status
- VoicemailContract.Voicemails
Exceptions


