final ContentProviderClient | acquireContentProviderClient(Uri uri) Returns a ContentProviderClient that is associated with the ContentProvider that services the content at uri, starting the provider if necessary. |
final ContentProviderClient | acquireContentProviderClient(String name) Returns a ContentProviderClient that is associated with the ContentProvider with the authority of name, starting the provider if necessary. |
final ContentProviderClient | acquireUnstableContentProviderClient(String name) Like acquireContentProviderClient(java.lang.String) , but for use when you do not trust the stability of the target content provider. |
final ContentProviderClient | acquireUnstableContentProviderClient(Uri uri) Like acquireContentProviderClient(android.net.Uri) , but for use when you do not trust the stability of the target content provider. |
static void | addPeriodicSync(Account account, String authority, Bundle extras, long pollFrequency) Specifies that a sync should be requested with the specified the account, authority, and extras at the given frequency. |
static Object | addStatusChangeListener(int mask, SyncStatusObserver callback) Request notifications when the different aspects of the SyncManager change. |
ContentProviderResult[] | applyBatch(String authority, ArrayList<ContentProviderOperation> operations) Applies each of the ContentProviderOperation objects and returns an array of their results. |
final int | bulkInsert(Uri url, ContentValues[] values) Inserts multiple rows into a table at the given URL. |
final Bundle | call(Uri uri, String method, String arg, Bundle extras) Call a provider-defined method. |
final Bundle | call(String authority, String method, String arg, Bundle extras) |
void | cancelSync(Uri uri) This method was deprecated in API level 15. instead use cancelSync(android.accounts.Account, java.lang.String) |
static void | cancelSync(SyncRequest request) Remove the specified sync. |
static void | cancelSync(Account account, String authority) Cancel any active or pending syncs that match account and authority. |
final Uri | canonicalize(Uri url) Transform the given url to a canonical representation of its referenced resource, which can be used across devices, persisted, backed up and restored, etc. |
final int | delete(Uri url, String where, String[] selectionArgs) Deletes row(s) specified by a content URI. |
final int | delete(Uri url, Bundle extras) Deletes row(s) specified by a content URI. |
static SyncInfo | getCurrentSync() This method was deprecated in API level 15. Since multiple concurrent syncs are now supported you should use getCurrentSyncs() to get the accurate list of current syncs. This method returns the first item from the list of current syncs or null if there are none. |
static List<SyncInfo> | getCurrentSyncs() Returns a list with information about all the active syncs. |
static int | getIsSyncable(Account account, String authority) Check if this account/provider is syncable. |
static boolean | getMasterSyncAutomatically() Gets the global auto-sync setting that applies to all the providers and accounts. |
List<UriPermission> | getOutgoingPersistedUriPermissions() Return list of all persisted URI permission grants that are hosted by the calling app. |
static List<PeriodicSync> | getPeriodicSyncs(Account account, String authority) Get the list of information about the periodic syncs for the given account and authority. |
List<UriPermission> | getPersistedUriPermissions() Return list of all URI permission grants that have been persisted by the calling app. |
String[] | getStreamTypes(Uri url, String mimeTypeFilter) Query for the possible MIME types for the representations the given content URL can be returned when opened as as stream with openTypedAssetFileDescriptor(Uri, String, Bundle) . |
static SyncAdapterType[] | getSyncAdapterTypes() Get information about the SyncAdapters that are known to the system. |
static boolean | getSyncAutomatically(Account account, String authority) Check if the provider should be synced when a network tickle is received This method requires the caller to hold the permission Manifest.permission.READ_SYNC_SETTINGS . |
final String | getType(Uri url) Return the MIME type of the given content URL. |
final ContentResolver.MimeTypeInfo | getTypeInfo(String mimeType) Return a detailed description of the given MIME type, including an icon and label that describe the type. |
final Uri | insert(Uri url, ContentValues values, Bundle extras) Inserts a row into a table at the given URL. |
final Uri | insert(Uri url, ContentValues values) Inserts a row into a table at the given URL. |
static boolean | isSyncActive(Account account, String authority) Returns true if there is currently a sync operation for the given account or authority actively being processed. |
static boolean | isSyncPending(Account account, String authority) Return true if the pending status is true of any matching authorities. |
Bitmap | loadThumbnail(Uri uri, Size size, CancellationSignal signal) Convenience method that efficiently loads a visual thumbnail for the given Uri . |
void | notifyChange(Collection<Uri> uris, ContentObserver observer, int flags) Notify registered observers that several rows have been updated. |
void | notifyChange(Uri uri, ContentObserver observer, boolean syncToNetwork) This method was deprecated in API level 30. callers should consider migrating to notifyChange(android.net.Uri, android.database.ContentObserver, int) , as it offers support for many more options than just NOTIFY_SYNC_TO_NETWORK . |
void | notifyChange(Uri uri, ContentObserver observer, int flags) Notify registered observers that a row was updated. |
void | notifyChange(Uri uri, ContentObserver observer) Notify registered observers that a row was updated and attempt to sync changes to the network. |
final AssetFileDescriptor | openAssetFile(Uri uri, String mode, CancellationSignal signal) |
final AssetFileDescriptor | openAssetFileDescriptor(Uri uri, String mode, CancellationSignal cancellationSignal) Open a raw file descriptor to access data under a URI. |
final AssetFileDescriptor | openAssetFileDescriptor(Uri uri, String mode) Open a raw file descriptor to access data under a URI. |
final ParcelFileDescriptor | openFile(Uri uri, String mode, CancellationSignal signal) |
final ParcelFileDescriptor | openFileDescriptor(Uri uri, String mode, CancellationSignal cancellationSignal) Open a raw file descriptor to access data under a URI. |
final ParcelFileDescriptor | openFileDescriptor(Uri uri, String mode) Open a raw file descriptor to access data under a URI. |
final InputStream | openInputStream(Uri uri) Open a stream on to the content associated with a content URI. |
final OutputStream | openOutputStream(Uri uri) Synonym for openOutputStream(uri, "w") . |
final OutputStream | openOutputStream(Uri uri, String mode) Open a stream on to the content associated with a content URI. |
final AssetFileDescriptor | openTypedAssetFile(Uri uri, String mimeTypeFilter, Bundle opts, CancellationSignal signal) |
final AssetFileDescriptor | openTypedAssetFileDescriptor(Uri uri, String mimeType, Bundle opts, CancellationSignal cancellationSignal) Open a raw file descriptor to access (potentially type transformed) data from a "content:" URI. |
final AssetFileDescriptor | openTypedAssetFileDescriptor(Uri uri, String mimeType, Bundle opts) Open a raw file descriptor to access (potentially type transformed) data from a "content:" URI. |
final Cursor | query(Uri uri, String[] projection, Bundle queryArgs, CancellationSignal cancellationSignal) Query the given URI, returning a Cursor over the result set with support for cancellation. |
final Cursor | query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder, CancellationSignal cancellationSignal) Query the given URI, returning a Cursor over the result set with optional support for cancellation. |
final Cursor | query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) Query the given URI, returning a Cursor over the result set. |
final boolean | refresh(Uri url, Bundle extras, CancellationSignal cancellationSignal) This allows clients to request an explicit refresh of content identified by uri . |
final void | registerContentObserver(Uri uri, boolean notifyForDescendants, ContentObserver observer) Register an observer class that gets callbacks when data identified by a given content URI changes. |
void | releasePersistableUriPermission(Uri uri, int modeFlags) Relinquish a persisted URI permission grant. |
static void | removePeriodicSync(Account account, String authority, Bundle extras) Remove a periodic sync. |
static void | removeStatusChangeListener(Object handle) Remove a previously registered status change listener. |
static void | requestSync(Account account, String authority, Bundle extras) Start an asynchronous sync operation. |
static void | requestSync(SyncRequest request) Register a sync with the SyncManager. |
static void | setIsSyncable(Account account, String authority, int syncable) Set whether this account/provider is syncable. |
static void | setMasterSyncAutomatically(boolean sync) Sets the global auto-sync setting that applies to all the providers and accounts. |
static void | setSyncAutomatically(Account account, String authority, boolean sync) Set whether or not the provider is synced when it receives a network tickle. |
void | startSync(Uri uri, Bundle extras) This method was deprecated in API level 15. instead use requestSync(android.accounts.Account, java.lang.String, android.os.Bundle) |
void | takePersistableUriPermission(Uri uri, int modeFlags) Take a persistable URI permission grant that has been offered. |
final Uri | uncanonicalize(Uri url) Given a canonical Uri previously generated by canonicalize(Uri) , convert it to its local non-canonical form. |
final void | unregisterContentObserver(ContentObserver observer) Unregisters a change observer. |
final int | update(Uri uri, ContentValues values, Bundle extras) Update row(s) in a content URI. |
final int | update(Uri uri, ContentValues values, String where, String[] selectionArgs) Update row(s) in a content URI. |
static void | validateSyncExtrasBundle(Bundle extras) Check that only values of the following types are in the Bundle: - Integer
- Long
- Boolean
- Float
- Double
- String
- Account
- null
|
static ContentResolver | wrap(ContentProviderClient wrapped) Create a ContentResolver instance that redirects all its methods to the given ContentProviderClient . |
static ContentResolver | wrap(ContentProvider wrapped) Create a ContentResolver instance that redirects all its methods to the given ContentProvider . |