VoicemailContract
  public
  
  
  
  class
  VoicemailContract
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.provider.VoicemailContract | 
The contract between the voicemail provider and applications. Contains definitions for the supported URIs and columns.
The content providers exposes two tables through this interface:
-  Voicemails table: This stores the actual voicemail records. The
   columns and URIs for accessing this table are defined by the
   Voicemailsclass.
-  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 Statusclass.
 The minimum permission needed to access this content provider is
 Manifest.permission.ADD_VOICEMAIL or carrier privileges (see
 TelephonyManager.hasCarrierPrivileges()).
 
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_VOICEMAILis generated for each new voicemail inserted.
-  Intent.ACTION_PROVIDER_CHANGEDis generated for any change made into the database, including new voicemail.
Summary
| Nested classes | |
|---|---|
| 
        
        
        
        
        class | VoicemailContract.StatusDefines fields exposed through the /status path of this content provider. | 
| 
        
        
        
        
        class | VoicemailContract.VoicemailsDefines fields exposed through the /voicemail path of this content provider. | 
| Constants | |
|---|---|
| String | ACTION_FETCH_VOICEMAILBroadcast intent to request a voicemail source to fetch voicemail content of a specific voicemail from the remote server. | 
| String | ACTION_NEW_VOICEMAILBroadcast intent when a new voicemail record is inserted. | 
| String | ACTION_SYNC_VOICEMAILBroadcast intent to request all voicemail sources to perform a sync with the remote server. | 
| String | AUTHORITYThe authority used by the voicemail provider. | 
| String | EXTRA_PHONE_ACCOUNT_HANDLEExtra included in  | 
| String | EXTRA_SELF_CHANGEExtra included in  | 
| String | PARAM_KEY_SOURCE_PACKAGEParameter key used in the URI to specify the voicemail source package name. | 
| Inherited methods | |
|---|---|
Constants
ACTION_FETCH_VOICEMAIL
public static final String ACTION_FETCH_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.
 All voicemail sources are expected to handle this event. After storing the content
 the application should also set Voicemails.HAS_CONTENT to 1;
Constant Value: "android.intent.action.FETCH_VOICEMAIL"
ACTION_NEW_VOICEMAIL
public static final String ACTION_NEW_VOICEMAIL
Broadcast intent when a new voicemail record is inserted.
Constant Value: "android.intent.action.NEW_VOICEMAIL"
ACTION_SYNC_VOICEMAIL
public static final String ACTION_SYNC_VOICEMAIL
Broadcast intent to request all voicemail sources to perform a sync with the remote server.
Constant Value: "android.provider.action.SYNC_VOICEMAIL"
AUTHORITY
public static final String AUTHORITY
The authority used by the voicemail provider.
Constant Value: "com.android.voicemail"
EXTRA_PHONE_ACCOUNT_HANDLE
public static final String EXTRA_PHONE_ACCOUNT_HANDLE
Extra included in ACTION_SYNC_VOICEMAIL broadcast intents to indicate which PhoneAccountHandle to sync.
Constant Value: "android.provider.extra.PHONE_ACCOUNT_HANDLE"
EXTRA_SELF_CHANGE
public static final String EXTRA_SELF_CHANGE
Extra included in Intent.ACTION_PROVIDER_CHANGED broadcast intents to indicate if the
 receiving package made this change.
Constant Value: "com.android.voicemail.extra.SELF_CHANGE"
PARAM_KEY_SOURCE_PACKAGE
public static final String PARAM_KEY_SOURCE_PACKAGE
Parameter key used in the URI to specify the voicemail source package name.
This field must be set in all requests that originate from a voicemail source.
Constant Value: "source_package"
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
