/**@class android.provider.VoicemailContract @extends java.lang.Object The contract between the voicemail provider and applications. Contains definitions for the supported URIs and columns. <P>The content providers exposes two tables through this interface: <ul> <li> Voicemails table: This stores the actual voicemail records. The columns and URIs for accessing this table are defined by the {@link android.provider.VoicemailContract.Voicemails} class. </li> <li> Status table: This provides a way for the voicemail source application to convey its current state to the system. The columns and URIS for accessing this table are defined by the {@link android.provider.VoicemailContract.Status} class. </li> </ul> <P> The minimum permission needed to access this content provider is {@link android.Manifest.permission#ADD_VOICEMAIL} or carrier privileges (see {@link android.telephony.TelephonyManager#hasCarrierPrivileges}). <P>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 {@link #PARAM_KEY_SOURCE_PACKAGE} in the URI to identify its package. <P>In addition to the {@link 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: <ul> <li> {@link #ACTION_NEW_VOICEMAIL} is generated for each new voicemail inserted. </li> <li> {@link Intent#ACTION_PROVIDER_CHANGED} is generated for any change made into the database, including new voicemail. </li> </ul> */ var VoicemailContract = { /**The authority used by the voicemail provider. */ AUTHORITY : "com.android.voicemail", /** Parameter key used in the URI to specify the voicemail source package name. <p> This field must be set in all requests that originate from a voicemail source. */ PARAM_KEY_SOURCE_PACKAGE : "source_package", /**Broadcast intent when a new voicemail record is inserted. */ ACTION_NEW_VOICEMAIL : "android.intent.action.NEW_VOICEMAIL", /** Broadcast intent to request a voicemail source to fetch voicemail content of a specific voicemail from the remote server. The voicemail to fetch is specified by the data uri of the intent. <p> All voicemail sources are expected to handle this event. After storing the content the application should also set {@link android.provider.VoicemailContract.Voicemails#HAS_CONTENT} to 1; */ ACTION_FETCH_VOICEMAIL : "android.intent.action.FETCH_VOICEMAIL", /** Broadcast intent to request all voicemail sources to perform a sync with the remote server. */ ACTION_SYNC_VOICEMAIL : "android.provider.action.SYNC_VOICEMAIL", /** Broadcast intent to inform a new visual voicemail SMS has been received. This intent will only be delivered to the telephony service. @see #EXTRA_VOICEMAIL_SMS @see #EXTRA_TARGET_PACKAGE @hide */ ACTION_VOICEMAIL_SMS_RECEIVED : "com.android.internal.provider.action.VOICEMAIL_SMS_RECEIVED", /** Extra in {@link #ACTION_VOICEMAIL_SMS_RECEIVED} indicating the content of the SMS. @hide */ EXTRA_VOICEMAIL_SMS : "android.provider.extra.VOICEMAIL_SMS", /** Extra in {@link #ACTION_VOICEMAIL_SMS_RECEIVED} indicating the target package to bind {@link android.telephony.VisualVoicemailService}. <p>This extra should be set to android.telephony.VisualVoicemailSmsFilterSettings#packageName while performing filtering. Since the default dialer might change between the filter sending it and telephony binding to the service, this ensures the service will not receive SMS filtered by the previous app. @hide */ EXTRA_TARGET_PACKAGE : "android.provider.extra.TARGET_PACAKGE", /** Extra included in {@link Intent#ACTION_PROVIDER_CHANGED} broadcast intents to indicate if the receiving package made this change. */ EXTRA_SELF_CHANGE : "com.android.voicemail.extra.SELF_CHANGE", /** Extra included in {@link #ACTION_SYNC_VOICEMAIL} broadcast intents to indicate which {@link android.provider.CommonDataKinds.PhoneAccountHandle} to sync. */ EXTRA_PHONE_ACCOUNT_HANDLE : "android.provider.extra.PHONE_ACCOUNT_HANDLE", /** Name of the source package field, which must be same across all voicemail related tables. This is an internal field. @hide */ SOURCE_PACKAGE_FIELD : "source_package", };