public abstract class ContentResolver extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CURSOR_DIR_BASE_TYPE |
static String |
CURSOR_ITEM_BASE_TYPE |
static String |
SCHEME_ANDROID_RESOURCE |
static String |
SCHEME_CONTENT |
static String |
SCHEME_FILE |
static String |
SYNC_EXTRAS_ACCOUNT
Deprecated.
|
static String |
SYNC_EXTRAS_DISCARD_LOCAL_DELETIONS |
static String |
SYNC_EXTRAS_DO_NOT_RETRY |
static String |
SYNC_EXTRAS_EXPEDITED |
static String |
SYNC_EXTRAS_FORCE
Deprecated.
|
static String |
SYNC_EXTRAS_IGNORE_BACKOFF |
static String |
SYNC_EXTRAS_IGNORE_SETTINGS |
static String |
SYNC_EXTRAS_INITIALIZE |
static String |
SYNC_EXTRAS_MANUAL |
static String |
SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS |
static String |
SYNC_EXTRAS_UPLOAD |
static int |
SYNC_OBSERVER_TYPE_ACTIVE |
static int |
SYNC_OBSERVER_TYPE_PENDING |
static int |
SYNC_OBSERVER_TYPE_SETTINGS |
| Constructor and Description |
|---|
ContentResolver(Context context) |
@Deprecated public static final String SYNC_EXTRAS_ACCOUNT
public static final String SYNC_EXTRAS_EXPEDITED
@Deprecated public static final String SYNC_EXTRAS_FORCE
public static final String SYNC_EXTRAS_IGNORE_SETTINGS
public static final String SYNC_EXTRAS_IGNORE_BACKOFF
public static final String SYNC_EXTRAS_DO_NOT_RETRY
public static final String SYNC_EXTRAS_MANUAL
public static final String SYNC_EXTRAS_UPLOAD
public static final String SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS
public static final String SYNC_EXTRAS_DISCARD_LOCAL_DELETIONS
public static final String SYNC_EXTRAS_INITIALIZE
public static final String SCHEME_CONTENT
public static final String SCHEME_ANDROID_RESOURCE
public static final String SCHEME_FILE
public static final String CURSOR_ITEM_BASE_TYPE
public static final String CURSOR_DIR_BASE_TYPE
public static final int SYNC_OBSERVER_TYPE_SETTINGS
public static final int SYNC_OBSERVER_TYPE_PENDING
public static final int SYNC_OBSERVER_TYPE_ACTIVE
public ContentResolver(Context context)
public final Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
public final Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder, CancellationSignal cancellationSignal)
public final InputStream openInputStream(Uri uri) throws FileNotFoundException
FileNotFoundExceptionpublic final OutputStream openOutputStream(Uri uri) throws FileNotFoundException
FileNotFoundExceptionpublic final OutputStream openOutputStream(Uri uri, String mode) throws FileNotFoundException
FileNotFoundExceptionpublic final ParcelFileDescriptor openFileDescriptor(Uri uri, String mode) throws FileNotFoundException
FileNotFoundExceptionpublic final AssetFileDescriptor openAssetFileDescriptor(Uri uri, String mode) throws FileNotFoundException
FileNotFoundExceptionpublic final AssetFileDescriptor openTypedAssetFileDescriptor(Uri uri, String mimeType, Bundle opts) throws FileNotFoundException
FileNotFoundExceptionpublic final Uri insert(Uri url, ContentValues values)
public ContentProviderResult[] applyBatch(String authority, ArrayList<ContentProviderOperation> operations) throws RemoteException, OperationApplicationException
public final int bulkInsert(Uri url, ContentValues[] values)
public final int update(Uri uri, ContentValues values, String where, String[] selectionArgs)
public final ContentProviderClient acquireContentProviderClient(Uri uri)
public final ContentProviderClient acquireContentProviderClient(String name)
public final ContentProviderClient acquireUnstableContentProviderClient(Uri uri)
public final ContentProviderClient acquireUnstableContentProviderClient(String name)
public final void registerContentObserver(Uri uri, boolean notifyForDescendents, ContentObserver observer)
public final void unregisterContentObserver(ContentObserver observer)
public void notifyChange(Uri uri, ContentObserver observer)
public void notifyChange(Uri uri, ContentObserver observer, boolean syncToNetwork)
@Deprecated public void startSync(Uri uri, Bundle extras)
public static void validateSyncExtrasBundle(Bundle extras)
@Deprecated public void cancelSync(Uri uri)
public static SyncAdapterType[] getSyncAdapterTypes()
public static void setSyncAutomatically(Account account, String authority, boolean sync)
public static void addPeriodicSync(Account account, String authority, Bundle extras, long pollFrequency)
public static void removePeriodicSync(Account account, String authority, Bundle extras)
public static List<PeriodicSync> getPeriodicSyncs(Account account, String authority)
public static boolean getMasterSyncAutomatically()
public static void setMasterSyncAutomatically(boolean sync)
@Deprecated public static SyncInfo getCurrentSync()
public static Object addStatusChangeListener(int mask, SyncStatusObserver callback)
public static void removeStatusChangeListener(Object handle)
Copyright © 2008-2013. All Rights Reserved.