SYNC_EXTRAS_IGNORE_SETTINGS
and SYNC_EXTRAS_IGNORE_BACKOFF
setIsSyncable(android.accounts.Account,java.lang.String,int) has been
called with a >= 0 value. When this flag is set the SyncAdapter does not need to
do a full sync, though it is allowed to do so.
content://com.company.provider.imap/inbox/1 for a particular
message in the inbox, whose MIME type would be reported as
CURSOR_ITEM_BASE_TYPE + "/vnd.company.imap-msg"
Compare with .
CURSOR_DIR_BASE_TYPE
content://com.company.provider.imap/inbox for all of the
messages in its inbox, whose MIME type would be reported as
CURSOR_DIR_BASE_TYPE + "/vnd.company.imap-msg"
Note how the base MIME type varies between this and
depending on whether there is
one single item or multiple items in the data set, while the sub-type
remains the same because in either case the data structure contained
in the cursor is the same.
CURSOR_ITEM_BASE_TYPE
Query the given URI, returning a over the result set.
android.database.Cursor
For best performance, the caller should follow these guidelines:
selection parameter, so that queries
that differ only by those values will be recognized as the same
for caching purposes.uri The URI, using the content:// scheme, for the content to
retrieve.projection A list of which columns to return. Passing null will
return all columns, which is inefficient.selection A filter declaring which rows to return, formatted as an
SQL WHERE clause (excluding the WHERE itself). Passing null will
return all rows for the given URI.selectionArgs You may include ?s in selection, which will be
replaced by the values from selectionArgs, in the order that they
appear in the selection. The values will be bound as Strings.sortOrder How to order the rows, formatted as an SQL ORDER BY
clause (excluding the ORDER BY itself). Passing null will use the
default sort order, which may be unordered.android.database.CursorSCHEME_CONTENT)SCHEME_ANDROID_RESOURCE)SCHEME_FILE)See for more information
on these schemes.
openAssetFileDescriptor(android.net.Uri,java.lang.String)
uri The desired URI.java.io.FileNotFoundException if the provided URI could not be opened.openAssetFileDescriptor(android.net.Uri,java.lang.String) openOutputStream(uri, "w").
java.io.FileNotFoundException if the provided URI could not be opened.SCHEME_CONTENT)SCHEME_FILE)See for more information
on these schemes.
openAssetFileDescriptor(android.net.Uri,java.lang.String)
uri The desired URI.mode May be "w", "wa", "rw", or "rwt".java.io.FileNotFoundException if the provided URI could not be opened.openAssetFileDescriptor(android.net.Uri,java.lang.String)openAssetFileDescriptor(android.net.Uri,java.lang.String), but uses the
underlying ContentProvider.openFile(android.net.Uri,java.lang.String)
ContentProvider.openFile()} method, so will not work with
providers that return sub-sections of files. If at all possible,
you should use openAssetFileDescriptor(android.net.Uri,java.lang.String). You
will receive a FileNotFoundException exception if the provider returns a
sub-section of a file.
SCHEME_CONTENT)SCHEME_FILE)See for more information
on these schemes.
openAssetFileDescriptor(android.net.Uri,java.lang.String)
uri The desired URI to open.mode The file mode to use, as per ContentProvider.openFile.java.io.FileNotFoundException Throws FileNotFoundException of no
file exists under the URI or the mode is invalid.openAssetFileDescriptor(android.net.Uri,java.lang.String)ContentProvider.openAssetFile(android.net.Uri,java.lang.String)
ContentProvider.openAssetFile()} method of the provider associated with the
given URI, to retrieve any file stored there.
SCHEME_CONTENT)SCHEME_ANDROID_RESOURCE)SCHEME_FILE)SCHEME_ANDROID_RESOURCE) SchemeA Uri object can be used to reference a resource in an APK file. The Uri should be one of the following formats:
android.resource://package_name/id_numberpackage_name is your package name as listed in your AndroidManifest.xml.
For example com.example.myappid_number is the int form of the ID.Uri uri = Uri.parse("android.resource://com.example.myapp/" + R.raw.my_resource");
android.resource://package_name/type/namepackage_name is your package name as listed in your AndroidManifest.xml.
For example com.example.myapptype is the string form of the resource type. For example, raw
or drawable.
name is the string form of the resource name. That is, whatever the file
name was in your res directory, without the type extension.
The easiest way to construct this form is
Uri uri = Uri.parse("android.resource://com.example.myapp/raw/my_resource");
uri The desired URI to open.mode The file mode to use, as per ContentProvider.openAssetFile.java.io.FileNotFoundException Throws FileNotFoundException of no
file exists under the URI or the mode is invalid.android.content.res.Resources that contains it, and a resource id.
url The URL of the table to insert into.values The initial values for the newly inserted row. The key is the column name for
the field. Passing an empty ContentValues will create an empty row.ContentProviderOperation objects and returns an array
of their results. Passes through OperationApplicationException, which may be thrown
by the call to ContentProviderOperation.apply(android.content.ContentProvider,android.content.ContentProviderResult[],int).
If all the applications succeed then a ContentProviderResult array with the
same number of elements as the operations will be returned. It is implementation-specific
how many, if any, operations will have been successfully applied if a call to
apply results in a OperationApplicationException.
authority the authority of the ContentProvider to which this batch should be appliedoperations the operations to applyOperationApplicationException thrown if an application fails.
See ContentProviderOperation.apply(android.content.ContentProvider,android.content.ContentProviderResult[],int) for more information.android.os.RemoteException thrown if a RemoteException is encountered while attempting
to communicate with a remote provider.url The URL of the table to insert into.values The initial values for the newly inserted rows. The key is the column name for
the field. Passing null will create an empty row.url The URL of the row to delete.where A filter to apply to rows before deleting, formatted as an SQL WHERE clause
(excluding the WHERE itself).uri The URI to modify.values The new field values. The key is the column name for the field.
A null value will remove an existing field value.where A filter to apply to rows before updating, formatted as an SQL WHERE clause
(excluding the WHERE itself).java.lang.NullPointerException if uri or values are nullContentProviderClient that is associated with the ContentProvider
that services the content at uri, starting the provider if necessary. Returns
null if there is no provider associated wih the uri. The caller must indicate that they are
done with the provider by calling ContentProviderClient.release() which will allow
the system to release the provider it it determines that there is no other reason for
keeping it active.
uri specifies which provider should be acquiredContentProviderClient that is associated with the ContentProvider
that services the content at uri or null if there isn't one.ContentProviderClient that is associated with the ContentProvider
with the authority of name, starting the provider if necessary. Returns
null if there is no provider associated wih the uri. The caller must indicate that they are
done with the provider by calling ContentProviderClient.release() which will allow
the system to release the provider it it determines that there is no other reason for
keeping it active.
name specifies which provider should be acquiredContentProviderClient that is associated with the ContentProvider
with the authority of name or null if there isn't one.uri The URI to watch for changes. This can be a specific row URI, or a base URI
for a whole class of content.notifyForDescendents If true changes to URIs beginning with uri
will also cause notifications to be sent. If false only changes to the exact URI
specified by uri will cause notifications to be sent. If true, than any URI values
at or below the specified URI will also trigger a match.observer The object that receives callbacks when changes occur.unregisterContentObserver(android.database.ContentObserver)observer The previously registered observer that is no longer needed.registerContentObserver(android.net.Uri,boolean,android.database.ContentObserver)registerContentObserver().
By default, CursorAdapter objects will get this notification.
uriobserver The observer that originated the change, may be null</null>syncToNetwork If true, attempt to sync the change to the network.requestSync(android.accounts.Account,java.lang.String,android.os.Bundle)uri the uri of the provider to sync or null to sync all providers.extras any extras to pass to the SyncAdapter.account which account should be syncedauthority which authority should be syncedextras any extras to pass to the SyncAdapter.cancelSync(android.accounts.Account,java.lang.String)uri the uri of the provider to sync or null to sync all providers.account filters the syncs that match by this accountauthority filters the syncs that match by this authorityThese periodic syncs honor the "syncAutomatically" and "masterSyncAutomatically" settings. Although these sync are scheduled at the specified frequency, it may take longer for it to actually be started if other syncs are ahead of it in the sync operation queue. This means that the actual start time may drift.
Periodic syncs are not allowed to have any of ,
SYNC_EXTRAS_DO_NOT_RETRY, SYNC_EXTRAS_IGNORE_BACKOFF,
SYNC_EXTRAS_IGNORE_SETTINGS, SYNC_EXTRAS_INITIALIZE,
SYNC_EXTRAS_FORCE, SYNC_EXTRAS_EXPEDITED set to true.
If any are supplied then an SYNC_EXTRAS_MANUAL will be thrown.
java.lang.IllegalArgumentException
account the account to specify in the syncauthority the provider to specify in the sync requestextras extra parameters to go along with the sync requestpollFrequency how frequently the sync should be performed, in seconds.java.lang.IllegalArgumentException if an illegal extra was set or if any of the parameters
are null.account the account whose periodic syncs we are queryingauthority the provider whose periodic syncs we are queryingaccount the account whose setting we are queryingauthority the provider whose behavior is being queriedmask the status change types that will cause the callback to be invokedcallback observer to be invoked when the status changeshandle the handle that was returned by addStatusChangeListener(int,android.content.SyncStatusObserver)