final
ContentProviderClient
|
acquireContentProviderClient(Uri uri)
|
final
ContentProviderClient
|
acquireContentProviderClient(String name)
|
final
ContentProviderClient
|
acquireUnstableContentProviderClient(Uri uri)
|
final
ContentProviderClient
|
acquireUnstableContentProviderClient(String name)
|
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)
|
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.
|
static
void
|
cancelSync(Account account, String authority)
Cancel any active or pending syncs that match account and authority.
|
void
|
cancelSync(Uri uri)
|
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.
|
static
SyncInfo
|
getCurrentSync()
This method was deprecated
in API level 11.
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 master 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)
|
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
READ_SYNC_SETTINGS .
|
final
String
|
getType(Uri url)
Return the MIME type of the given content 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 in the pending list, or actively being processed.
|
static
boolean
|
isSyncPending(Account account, String authority)
Return true if the pending status is true of any matching authorities.
|
void
|
notifyChange(Uri uri, ContentObserver observer, boolean syncToNetwork)
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
|
openAssetFileDescriptor(Uri uri, String mode)
Open a raw file descriptor to access data under a URI.
|
final
AssetFileDescriptor
|
openAssetFileDescriptor(Uri uri, String mode, CancellationSignal cancellationSignal)
Open a raw file descriptor to access data under a URI.
|
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)
|
final
OutputStream
|
openOutputStream(Uri uri, String mode)
Open a stream on to the content associated with a content URI.
|
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, String selection, String[] selectionArgs, String sortOrder)
Query the given URI, returning a Cursor over the result set.
|
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.
|
final
void
|
registerContentObserver(Uri uri, boolean notifyForDescendents, 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 master 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)
|
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, 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
|