Example usage for Java android.content ContentResolver fields, constructors, methods, implement or subclass
The text is from its open source code.
String | SYNC_EXTRAS_ACCOUNT |
String | SYNC_EXTRAS_EXPEDITED If this extra is set to true, the sync request will be scheduled at the front of the sync request queue and without any delay |
String | SYNC_EXTRAS_FORCE |
String | SYNC_EXTRAS_IGNORE_SETTINGS If this extra is set to true then the sync settings (like getSyncAutomatically()) are ignored by the sync scheduler. |
String | SYNC_EXTRAS_IGNORE_BACKOFF If this extra is set to true then any backoffs for the initial attempt (e.g. |
String | SYNC_EXTRAS_DO_NOT_RETRY If this extra is set to true then the request will not be retried if it fails. |
String | SYNC_EXTRAS_MANUAL Setting this extra is the equivalent of setting both #SYNC_EXTRAS_IGNORE_SETTINGS and #SYNC_EXTRAS_IGNORE_BACKOFF |
String | SYNC_EXTRAS_UPLOAD Indicates that this sync is intended to only upload local changes to the server. |
String | SYNC_EXTRAS_INITIALIZE Set by the SyncManager to request that the SyncAdapter initialize itself for the given account/authority pair. |
String | SCHEME_CONTENT |
String | SCHEME_ANDROID_RESOURCE |
String | SCHEME_FILE |
String | CURSOR_ITEM_BASE_TYPE This is the Android platform's base MIME type for a content: URI containing a Cursor of a single item. |
String | CURSOR_DIR_BASE_TYPE This is the Android platform's base MIME type for a content: URI containing a Cursor of zero or more items. |
int | SYNC_OBSERVER_TYPE_SETTINGS |
int | SYNC_OBSERVER_TYPE_PENDING |
int | SYNC_OBSERVER_TYPE_ACTIVE |
ContentProviderClient | acquireContentProviderClient(@NonNull Uri uri) Returns a ContentProviderClient that is associated with the ContentProvider that services the content at uri, starting the provider if necessary. |
ContentProviderClient | acquireContentProviderClient(@NonNull String name) Returns a ContentProviderClient that is associated with the ContentProvider with the authority of name, starting the provider if necessary. |
IContentProvider | acquireProvider(Uri uri) Returns the content provider for the given content URI. |
IContentProvider | acquireProvider(String name) |
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. |
Object | addStatusChangeListener(int mask, final SyncStatusObserver callback) Request notifications when the different aspects of the SyncManager change. |
ContentProviderResult[] | applyBatch(@NonNull String authority, @NonNull ArrayList Applies each of the ContentProviderOperation objects and returns an array of their results. |
int | bulkInsert(@RequiresPermission.Write @NonNull Uri url, @NonNull ContentValues[] values) Inserts multiple rows into a table at the given URL. |
Bundle | call(@NonNull Uri uri, @NonNull String method, @Nullable String arg, @Nullable Bundle extras) Call a provider-defined method. |
void | cancelSync(Account account, String authority) Cancel any active or pending syncs that match account and authority. |
int | delete(@RequiresPermission.Write @NonNull Uri url, @Nullable String where, @Nullable String[] selectionArgs) Deletes row(s) specified by a content URI. |
Class> | getClass() Returns the runtime class of this Object . |
List | getCurrentSyncs() Returns a list with information about all the active syncs. |
int | getIsSyncable(Account account, String authority) Check if this account/provider is syncable. |
boolean | getMasterSyncAutomatically() Gets the master auto-sync setting that applies to all the providers and accounts. |
List | getPeriodicSyncs(Account account, String authority) Get the list of information about the periodic syncs for the given account and authority. |
List | getPersistedUriPermissions() Return list of all URI permission grants that have been persisted by the calling app. |
String[] | getStreamTypes(@NonNull Uri url, @NonNull 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 . |
SyncAdapterType[] | getSyncAdapterTypes() Get information about the SyncAdapters that are known to the system. |
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 android.Manifest.permission#READ_SYNC_SETTINGS . |
String | getType(@NonNull Uri url) Return the MIME type of the given content URL. |
Uri | insert(@RequiresPermission.Write @NonNull Uri url, @Nullable ContentValues values) Inserts a row into a table at the given URL. |
boolean | isSyncActive(Account account, String authority) Returns true if there is currently a sync operation for the given account or authority actively being processed. |
boolean | isSyncPending(Account account, String authority) Return true if the pending status is true of any matching authorities. |
void | notifyChange(@NonNull Uri uri, @Nullable ContentObserver observer) Notify registered observers that a row was updated and attempt to sync changes to the network. |
void | notifyChange(@NonNull Uri uri, @Nullable ContentObserver observer, boolean syncToNetwork) Notify registered observers that a row was updated. |
void | notifyChange(@NonNull Uri uri, @Nullable ContentObserver observer, @NotifyFlags int flags) Notify registered observers that a row was updated. |
AssetFileDescriptor | openAssetFileDescriptor(@NonNull Uri uri, @NonNull String mode) Open a raw file descriptor to access data under a URI. |
ParcelFileDescriptor | openFileDescriptor(@NonNull Uri uri, @NonNull String mode) Open a raw file descriptor to access data under a URI. |
InputStream | openInputStream(@NonNull Uri uri) Open a stream on to the content associated with a content URI. |
OutputStream | openOutputStream(@NonNull Uri uri) Synonym for #openOutputStream(Uri,String) openOutputStream(uri, "w") . |
OutputStream | openOutputStream(@NonNull Uri uri, @NonNull String mode) Open a stream on to the content associated with a content URI. |
AssetFileDescriptor | openTypedAssetFileDescriptor(@NonNull Uri uri, @NonNull String mimeType, @Nullable Bundle opts) Open a raw file descriptor to access (potentially type transformed) data from a "content:" URI. |
Cursor | query(@RequiresPermission.Read @NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder) Query the given URI, returning a Cursor over the result set. |
Cursor | query(@RequiresPermission.Read @NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder, @Nullable CancellationSignal cancellationSignal) Query the given URI, returning a Cursor over the result set with optional support for cancellation. |
Cursor | query(final @RequiresPermission.Read @NonNull Uri uri, @Nullable String[] projection, @Nullable Bundle queryArgs, @Nullable CancellationSignal cancellationSignal) Query the given URI, returning a Cursor over the result set with support for cancellation. |
void | registerContentObserver(@NonNull Uri uri, boolean notifyForDescendants, @NonNull ContentObserver observer) Register an observer class that gets callbacks when data identified by a given content URI changes. |
void | removePeriodicSync(Account account, String authority, Bundle extras) Remove a periodic sync. |
void | removeStatusChangeListener(Object handle) Remove a previously registered status change listener. |
void | requestSync(Account account, String authority, Bundle extras) Start an asynchronous sync operation. |
void | requestSync(SyncRequest request) Register a sync with the SyncManager. |
void | setIsSyncable(Account account, String authority, int syncable) Set whether this account/provider is syncable. |
void | setMasterSyncAutomatically(boolean sync) Sets the master auto-sync setting that applies to all the providers and accounts. |
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) Start an asynchronous sync operation. |
void | takePersistableUriPermission(@NonNull Uri uri, @Intent.AccessUriMode int modeFlags) Take a persistable URI permission grant that has been offered. |
void | unregisterContentObserver(@NonNull ContentObserver observer) Unregisters a change observer. |
int | update(@RequiresPermission.Write @NonNull Uri uri, @Nullable ContentValues values, @Nullable String where, @Nullable String[] selectionArgs) Update row(s) in a content URI. |