android.content
Class ContentResolver
java.lang.Object
android.content.ContentResolver
public abstract class ContentResolver
- extends Object
Method Summary |
ContentProviderClient |
acquireContentProviderClient(String name)
|
ContentProviderClient |
acquireContentProviderClient(Uri uri)
|
static void |
addPeriodicSync(Account account,
String authority,
Bundle extras,
long pollFrequency)
|
static Object |
addStatusChangeListener(int mask,
SyncStatusObserver callback)
|
ContentProviderResult[] |
applyBatch(String authority,
ArrayList<ContentProviderOperation> operations)
|
int |
bulkInsert(Uri url,
ContentValues[] values)
|
static void |
cancelSync(Account account,
String authority)
|
void |
cancelSync(Uri uri)
|
int |
delete(Uri url,
String where,
String[] selectionArgs)
|
static SyncInfo |
getCurrentSync()
|
static int |
getIsSyncable(Account account,
String authority)
|
static boolean |
getMasterSyncAutomatically()
|
static List<PeriodicSync> |
getPeriodicSyncs(Account account,
String authority)
|
static SyncAdapterType[] |
getSyncAdapterTypes()
|
static boolean |
getSyncAutomatically(Account account,
String authority)
|
String |
getType(Uri url)
|
Uri |
insert(Uri url,
ContentValues values)
|
static boolean |
isSyncActive(Account account,
String authority)
|
static boolean |
isSyncPending(Account account,
String authority)
|
void |
notifyChange(Uri uri,
ContentObserver observer)
|
void |
notifyChange(Uri uri,
ContentObserver observer,
boolean syncToNetwork)
|
AssetFileDescriptor |
openAssetFileDescriptor(Uri uri,
String mode)
|
ParcelFileDescriptor |
openFileDescriptor(Uri uri,
String mode)
|
InputStream |
openInputStream(Uri uri)
|
OutputStream |
openOutputStream(Uri uri)
|
OutputStream |
openOutputStream(Uri uri,
String mode)
|
Cursor |
query(Uri uri,
String[] projection,
String selection,
String[] selectionArgs,
String sortOrder)
|
void |
registerContentObserver(Uri uri,
boolean notifyForDescendents,
ContentObserver observer)
|
static void |
removePeriodicSync(Account account,
String authority,
Bundle extras)
|
static void |
removeStatusChangeListener(Object handle)
|
static void |
requestSync(Account account,
String authority,
Bundle extras)
|
static void |
setIsSyncable(Account account,
String authority,
int syncable)
|
static void |
setMasterSyncAutomatically(boolean sync)
|
static void |
setSyncAutomatically(Account account,
String authority,
boolean sync)
|
void |
startSync(Uri uri,
Bundle extras)
|
void |
unregisterContentObserver(ContentObserver observer)
|
int |
update(Uri uri,
ContentValues values,
String where,
String[] selectionArgs)
|
static void |
validateSyncExtrasBundle(Bundle extras)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SYNC_EXTRAS_ACCOUNT
public static final String SYNC_EXTRAS_ACCOUNT
- See Also:
- Constant Field Values
SYNC_EXTRAS_EXPEDITED
public static final String SYNC_EXTRAS_EXPEDITED
- See Also:
- Constant Field Values
SYNC_EXTRAS_FORCE
public static final String SYNC_EXTRAS_FORCE
- See Also:
- Constant Field Values
SYNC_EXTRAS_IGNORE_SETTINGS
public static final String SYNC_EXTRAS_IGNORE_SETTINGS
- See Also:
- Constant Field Values
SYNC_EXTRAS_IGNORE_BACKOFF
public static final String SYNC_EXTRAS_IGNORE_BACKOFF
- See Also:
- Constant Field Values
SYNC_EXTRAS_DO_NOT_RETRY
public static final String SYNC_EXTRAS_DO_NOT_RETRY
- See Also:
- Constant Field Values
SYNC_EXTRAS_MANUAL
public static final String SYNC_EXTRAS_MANUAL
- See Also:
- Constant Field Values
SYNC_EXTRAS_UPLOAD
public static final String SYNC_EXTRAS_UPLOAD
- See Also:
- Constant Field Values
SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS
public static final String SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS
- See Also:
- Constant Field Values
SYNC_EXTRAS_DISCARD_LOCAL_DELETIONS
public static final String SYNC_EXTRAS_DISCARD_LOCAL_DELETIONS
- See Also:
- Constant Field Values
SYNC_EXTRAS_INITIALIZE
public static final String SYNC_EXTRAS_INITIALIZE
- See Also:
- Constant Field Values
SCHEME_CONTENT
public static final String SCHEME_CONTENT
- See Also:
- Constant Field Values
SCHEME_ANDROID_RESOURCE
public static final String SCHEME_ANDROID_RESOURCE
- See Also:
- Constant Field Values
SCHEME_FILE
public static final String SCHEME_FILE
- See Also:
- Constant Field Values
CURSOR_ITEM_BASE_TYPE
public static final String CURSOR_ITEM_BASE_TYPE
- See Also:
- Constant Field Values
CURSOR_DIR_BASE_TYPE
public static final String CURSOR_DIR_BASE_TYPE
- See Also:
- Constant Field Values
SYNC_OBSERVER_TYPE_SETTINGS
public static final int SYNC_OBSERVER_TYPE_SETTINGS
- See Also:
- Constant Field Values
SYNC_OBSERVER_TYPE_PENDING
public static final int SYNC_OBSERVER_TYPE_PENDING
- See Also:
- Constant Field Values
SYNC_OBSERVER_TYPE_ACTIVE
public static final int SYNC_OBSERVER_TYPE_ACTIVE
- See Also:
- Constant Field Values
ContentResolver
public ContentResolver(Context context)
getType
public final String getType(Uri url)
query
public final Cursor query(Uri uri,
String[] projection,
String selection,
String[] selectionArgs,
String sortOrder)
openInputStream
public final InputStream openInputStream(Uri uri)
throws FileNotFoundException
- Throws:
FileNotFoundException
openOutputStream
public final OutputStream openOutputStream(Uri uri)
throws FileNotFoundException
- Throws:
FileNotFoundException
openOutputStream
public final OutputStream openOutputStream(Uri uri,
String mode)
throws FileNotFoundException
- Throws:
FileNotFoundException
openFileDescriptor
public final ParcelFileDescriptor openFileDescriptor(Uri uri,
String mode)
throws FileNotFoundException
- Throws:
FileNotFoundException
openAssetFileDescriptor
public final AssetFileDescriptor openAssetFileDescriptor(Uri uri,
String mode)
throws FileNotFoundException
- Throws:
FileNotFoundException
insert
public final Uri insert(Uri url,
ContentValues values)
applyBatch
public ContentProviderResult[] applyBatch(String authority,
ArrayList<ContentProviderOperation> operations)
throws RemoteException,
OperationApplicationException
- Throws:
RemoteException
OperationApplicationException
bulkInsert
public final int bulkInsert(Uri url,
ContentValues[] values)
delete
public final int delete(Uri url,
String where,
String[] selectionArgs)
update
public final int update(Uri uri,
ContentValues values,
String where,
String[] selectionArgs)
acquireContentProviderClient
public final ContentProviderClient acquireContentProviderClient(Uri uri)
acquireContentProviderClient
public final ContentProviderClient acquireContentProviderClient(String name)
registerContentObserver
public final void registerContentObserver(Uri uri,
boolean notifyForDescendents,
ContentObserver observer)
unregisterContentObserver
public final void unregisterContentObserver(ContentObserver observer)
notifyChange
public void notifyChange(Uri uri,
ContentObserver observer)
notifyChange
public void notifyChange(Uri uri,
ContentObserver observer,
boolean syncToNetwork)
startSync
public void startSync(Uri uri,
Bundle extras)
requestSync
public static void requestSync(Account account,
String authority,
Bundle extras)
validateSyncExtrasBundle
public static void validateSyncExtrasBundle(Bundle extras)
cancelSync
public void cancelSync(Uri uri)
cancelSync
public static void cancelSync(Account account,
String authority)
getSyncAdapterTypes
public static SyncAdapterType[] getSyncAdapterTypes()
getSyncAutomatically
public static boolean getSyncAutomatically(Account account,
String authority)
setSyncAutomatically
public static void setSyncAutomatically(Account account,
String authority,
boolean sync)
addPeriodicSync
public static void addPeriodicSync(Account account,
String authority,
Bundle extras,
long pollFrequency)
removePeriodicSync
public static void removePeriodicSync(Account account,
String authority,
Bundle extras)
getPeriodicSyncs
public static List<PeriodicSync> getPeriodicSyncs(Account account,
String authority)
getIsSyncable
public static int getIsSyncable(Account account,
String authority)
setIsSyncable
public static void setIsSyncable(Account account,
String authority,
int syncable)
getMasterSyncAutomatically
public static boolean getMasterSyncAutomatically()
setMasterSyncAutomatically
public static void setMasterSyncAutomatically(boolean sync)
isSyncActive
public static boolean isSyncActive(Account account,
String authority)
getCurrentSync
public static SyncInfo getCurrentSync()
isSyncPending
public static boolean isSyncPending(Account account,
String authority)
addStatusChangeListener
public static Object addStatusChangeListener(int mask,
SyncStatusObserver callback)
removeStatusChangeListener
public static void removeStatusChangeListener(Object handle)
Copyright © 2008-2010. All Rights Reserved.