public class VoicemailContract extends Object
The content providers exposes two tables through this interface:
VoicemailContract.Voicemails
class.
VoicemailContract.Status
class.
The minimum permission needed to access this content provider is
Manifest.permission#ADD_VOICEMAIL
Voicemails are inserted by what is called as a "voicemail source"
application, which is responsible for syncing voicemail data between a remote
server and the local voicemail content provider. "voicemail source"
application should always set the PARAM_KEY_SOURCE_PACKAGE
in the
URI to identify its package.
In addition to the ContentObserver
notifications the voicemail
provider also generates broadcast intents to notify change for applications
that are not active and therefore cannot listen to ContentObserver
notifications. Broadcast intents with following actions are generated:
ACTION_NEW_VOICEMAIL
is generated for each new voicemail
inserted.
Intent.ACTION_PROVIDER_CHANGED
is generated for any change
made into the database, including new voicemail.
Modifier and Type | Class and Description |
---|---|
static class |
VoicemailContract.Status
Defines fields exposed through the /status path of this content provider.
|
static class |
VoicemailContract.Voicemails
Defines fields exposed through the /voicemail path of this content provider.
|
Modifier and Type | Field and Description |
---|---|
static String |
ACTION_FETCH_VOICEMAIL
Broadcast intent to request a voicemail source to fetch voicemail content of a specific
voicemail from the remote server.
|
static String |
ACTION_NEW_VOICEMAIL
Broadcast intent when a new voicemail record is inserted.
|
static String |
ACTION_SYNC_VOICEMAIL
Broadcast intent to request all voicemail sources to perform a sync with the remote server.
|
static String |
ACTION_VOICEMAIL_SMS_RECEIVED |
static String |
AUTHORITY
The authority used by the voicemail provider.
|
static String |
EXTRA_PHONE_ACCOUNT_HANDLE
Extra included in
ACTION_SYNC_VOICEMAIL broadcast intents to indicate which PhoneAccountHandle to sync. |
static String |
EXTRA_SELF_CHANGE
Extra included in
Intent.ACTION_PROVIDER_CHANGED broadcast intents to indicate if the
receiving package made this change. |
static String |
EXTRA_VOICEMAIL_SMS_FIELDS |
static String |
EXTRA_VOICEMAIL_SMS_MESSAGE_BODY |
static String |
EXTRA_VOICEMAIL_SMS_PREFIX |
static String |
EXTRA_VOICEMAIL_SMS_SUBID |
static String |
PARAM_KEY_SOURCE_PACKAGE
Parameter key used in the URI to specify the voicemail source package name.
|
static String |
SOURCE_PACKAGE_FIELD
Name of the source package field, which must be same across all voicemail related tables.
|
public static final String AUTHORITY
public static final String PARAM_KEY_SOURCE_PACKAGE
This field must be set in all requests that originate from a voicemail source.
public static final String ACTION_NEW_VOICEMAIL
public static final String ACTION_FETCH_VOICEMAIL
All voicemail sources are expected to handle this event. After storing the content
the application should also set VoicemailContract.Voicemails.HAS_CONTENT
to 1;
public static final String ACTION_SYNC_VOICEMAIL
public static final String ACTION_VOICEMAIL_SMS_RECEIVED
public static final String EXTRA_VOICEMAIL_SMS_PREFIX
public static final String EXTRA_VOICEMAIL_SMS_FIELDS
public static final String EXTRA_VOICEMAIL_SMS_MESSAGE_BODY
public static final String EXTRA_VOICEMAIL_SMS_SUBID
public static final String EXTRA_SELF_CHANGE
Intent.ACTION_PROVIDER_CHANGED
broadcast intents to indicate if the
receiving package made this change.public static final String EXTRA_PHONE_ACCOUNT_HANDLE
ACTION_SYNC_VOICEMAIL
broadcast intents to indicate which PhoneAccountHandle
to sync.public static final String SOURCE_PACKAGE_FIELD