Android.Content Namespace

Provides Android APIs for application contexts, components, intents, and data sharing.

Classes

Name Description
AbstractThreadedSyncAdapter

An abstract implementation of a SyncAdapter that spawns a thread to invoke a sync operation.

ActivityNotFoundException

This exception is thrown when a call to Context#startActivity or one of its variants fails because an Activity can not be found to execute the given Intent.

AsyncQueryHandler

A helper class to help make handling asynchronous ContentResolver queries easier.

AsyncQueryHandler.WorkerArgs

Holds the arguments and result for an operation processed by AsyncQueryHandler.

AsyncQueryHandler.WorkerHandler

Dispatches operations queued by AsyncQueryHandler on its worker thread.

AsyncTaskLoader

Abstract Loader that provides an AsyncTask to do the work.

AttributionSource

This class represents a source to which access to permission protected data should be attributed.

AttributionSource.Builder

A builder for AttributionSource

AttributionSource.InterfaceConsts

Contains managed aliases for constants declared by AttributionSource.

BroadcastReceiver

Base class for code that receives and handles broadcast intents sent by android.content.Context#sendBroadcast(Intent).

BroadcastReceiver.PendingResult

State for a result that is pending for a broadcast receiver.

BroadcastReceiverAttribute

Generates a /manifest/application/receiver element within AndroidManifest.xml.

ClipboardManager

Interface to the clipboard service, for placing and retrieving text in the global clipboard.

ClipData

Representation of a clipped data on the clipboard.

ClipData.InterfaceConsts

Contains managed aliases for constants declared by ClipData.

ClipData.Item

Description of a single item in a ClipData.

ClipData.Item.Builder

Builds a ClipData.Item by supplying its optional content.

ClipDescription

Meta-data describing the contents of a ClipData.

ClipDescription.InterfaceConsts

Contains managed aliases for constants declared by ClipDescription.

ComponentCallbacks2

Extended IComponentCallbacks interface with a new callback for finer-grained memory management.

ComponentName

Identifier for a specific application component (android.app.Activity, android.app.Service, android.content.BroadcastReceiver, or android.content.ContentProvider) that is available.

ComponentName.InterfaceConsts

Contains managed aliases for constants declared by ComponentName.

ContentProvider

Content providers are one of the primary building blocks of Android applications, providing content to applications.

ContentProvider.CallingIdentity

Opaque token representing the identity of an incoming IPC.

ContentProvider.InterfaceConsts

Contains managed aliases for constants declared by ContentProvider.

ContentProviderAttribute

Generates a /manifest/application/provider element within AndroidManifest.xml.

ContentProviderClient

The public interface object used to interact with a specific ContentProvider.

ContentProviderOperation

Represents a single operation to be performed as part of a batch of operations.

ContentProviderOperation.Builder

Used to add parameters to a ContentProviderOperation.

ContentProviderOperation.InterfaceConsts

Contains managed aliases for constants declared by ContentProviderOperation.

ContentProviderResult

Contains the result of the application of a ContentProviderOperation.

ContentProviderResult.InterfaceConsts

Contains managed aliases for constants declared by ContentProviderResult.

ContentQueryMap

Caches the contents of a cursor into a Map of String->ContentValues and optionally keeps the cache fresh by registering for updates on the content backing the cursor.

ContentResolver

This class provides applications access to the content model.

ContentResolver.MimeTypeInfo

Detailed description of a specific MIME type, including an icon and label that describe the type.

ContentUris

Utility methods useful for working with android.net.Uri objects that use the "content" (content://) scheme.

ContentValues

This class is used to store a set of values that the ContentResolver can process.

ContentValues.InterfaceConsts

Contains managed aliases for constants declared by ContentValues.

Context

Interface to global information about an application environment.

Context.BindServiceFlags

Specific flags used for bindService() call, which encapsulates a 64 bits long integer.

ContextParams

This class represents rules around how a context being created via Context#createContext should behave.

ContextParams.Builder

Builder for creating a ContextParams.

ContextWrapper

Proxying implementation of Context that simply delegates all of its calls to another Context.

CursorLoader

A loader that queries the ContentResolver and returns a Cursor.

DialogClickEventArgs

Provides data for a dialog click event.

DialogInterface
DialogKeyEventArgs

Provides data for the KeyPress event.

DialogMultiChoiceClickEventArgs

Provides data for a dialog multi-choice click event.

Entity

A representation of a item using ContentValues.

Entity.NamedContentValues

Associates a name with a set of ContentValues in an Entity.

GrantUriPermissionAttribute

Generates a /manifest/provider/grant-uri-permission elements within AndroidManifest.xml.

Intent

An intent is an abstract description of an operation to be performed.

Intent.FilterComparison

Wrapper class holding an Intent and implementing comparisons on it for the purpose of filtering.

Intent.InterfaceConsts

Contains managed aliases for constants declared by Intent.

Intent.ShortcutIconResource

Represents a shortcut/live folder icon resource.

Intent.ShortcutIconResource.InterfaceConsts

Contains managed aliases for constants declared by Intent.ShortcutIconResource.

IntentFilter

Structured description of Intent values to be matched.

IntentFilter.AuthorityEntry

This is an entry for a single authority in the Iterator returned by #authoritiesIterator().

IntentFilter.InterfaceConsts

Contains managed aliases for constants declared by IntentFilter.

IntentFilter.MalformedMimeTypeException

This exception is thrown when a given MIME type does not have a valid syntax.

IntentSender

A description of an Intent and target action to perform with it.

IntentSender.InterfaceConsts

Contains managed aliases for constants declared by IntentSender.

IntentSender.SendIntentException

Exception thrown when trying to send through a PendingIntent that has been canceled or is otherwise no longer able to execute the request.

Loader

A class that performs asynchronous loading of data.

Loader.ForceLoadContentObserver

An implementation of a ContentObserver that takes care of connecting it to the Loader to have the loader re-load its data when the observer is told it has changed.

Loader.LoadCanceledEventArgs

Provides data for a loader cancellation event.

Loader.LoadCompleteEventArgs

Provides data for a loader completion event.

LocusId

An identifier for an unique state (locus) in the application.

LocusId.InterfaceConsts

Contains managed aliases for constants declared by LocusId.

MutableContextWrapper

Special version of ContextWrapper that allows the base context to be modified after it is initially set.

OperationApplicationException

Thrown when an application of a ContentProviderOperation fails due the specified constraints.

PeriodicSync

Value type that contains information about a periodic sync.

PeriodicSync.InterfaceConsts

Contains managed aliases for constants declared by PeriodicSync.

QuickViewConstants

Constants for Intent#ACTION_QUICK_VIEW.

ReceiverCallNotAllowedException

This exception is thrown from Context#registerReceiver and Context#bindService when these methods are being used from an BroadcastReceiver component.

RestrictionEntry

Applications can expose restrictions for a restricted user on a multiuser device.

RestrictionEntry.InterfaceConsts

Contains managed aliases for constants declared by RestrictionEntry.

RestrictionsManager

Provides a mechanism for apps to query restrictions imposed by an entity that manages the user.

SearchRecentSuggestionsProvider

This superclass can be used to create a simple search suggestions provider for your application.

SharedPreferencesOnSharedPreferenceChangeEventArgs

Provides data for a shared-preference change event.

SyncAdapterType

Value type that represents a SyncAdapterType.

SyncAdapterType.InterfaceConsts

Contains managed aliases for constants declared by SyncAdapterType.

SyncContext

Provides a synchronization adapter with callbacks for reporting completion and obtaining its binder.

SyncInfo

Information about the sync operation that is currently underway.

SyncInfo.InterfaceConsts

Contains managed aliases for constants declared by SyncInfo.

SyncRequest

Convenience class to construct sync requests.

SyncRequest.Builder

Builder class for a SyncRequest.

SyncRequest.InterfaceConsts

Contains managed aliases for constants declared by SyncRequest.

SyncResult

This class is used to communicate the results of a sync operation to the SyncManager.

SyncResult.InterfaceConsts

Contains managed aliases for constants declared by SyncResult.

SyncStats

Used to record various statistics about the result of a sync operation.

SyncStats.InterfaceConsts

Contains managed aliases for constants declared by SyncStats.

UriMatcher

Utility class to aid in matching URIs in content providers.

UriPermission

Description of a single Uri permission grant.

UriPermission.InterfaceConsts

Contains managed aliases for constants declared by UriPermission.

UriRelativeFilter

A filter for matching Intent URI Data as part of a UriRelativeFilterGroup.

UriRelativeFilterGroup

An intent data matching group based on a URI's relative reference which includes the path, query and fragment.

Interfaces

Name Description
ClipboardManager.IOnPrimaryClipChangedListener

Defines a listener callback that is invoked when the primary clip on the clipboard changes.

ContentProvider.IPipeDataWriter

Interface to write a stream of data to a pipe.

IComponentCallbacks

The set of callback APIs that are common to all application components (android.app.Activity, android.app.Service, ContentProvider, and android.app.Application).

IComponentCallbacks2

Extended ComponentCallbacks interface with a new callback for finer-grained memory management.

IDialogInterface

Interface that defines a dialog-type class that can be shown, dismissed, or canceled, and may have buttons that can be clicked.

IDialogInterfaceOnCancelListener

Interface used to allow the creator of a dialog to run some code when the dialog is canceled.

IDialogInterfaceOnClickListener

Interface used to allow the creator of a dialog to run some code when an item on the dialog is clicked.

IDialogInterfaceOnDismissListener

Interface used to allow the creator of a dialog to run some code when the dialog is dismissed.

IDialogInterfaceOnKeyListener

Interface definition for a callback to be invoked when a key event is dispatched to this dialog.

IDialogInterfaceOnMultiChoiceClickListener

Interface used to allow the creator of a dialog to run some code when an item in a multi-choice dialog is clicked.

IDialogInterfaceOnShowListener

Interface used to allow the creator of a dialog to run some code when the dialog is shown.

IntentSender.IOnFinished

Callback interface for discovering when a send operation has completed.

IServiceConnection

Interface for monitoring the state of an application service.

ISharedPreferences

Interface for accessing and modifying preference data returned by Context#getSharedPreferences.

ISharedPreferencesEditor

Interface used for modifying values in a SharedPreferences object.

ISharedPreferencesOnSharedPreferenceChangeListener

Interface definition for a callback to be invoked when a shared preference is changed.

ISyncStatusObserver

Receives notifications when synchronization status changes.

Loader.IOnLoadCanceledListener

Interface that is implemented to discover when a Loader has been canceled before it finished loading its data.

Loader.IOnLoadCompleteListener

Interface that is implemented to discover when a Loader has finished loading its data.

Enums

Name Description
ActivityFlags

Enumerates values returned by several types and taken as a parameter of several types.

Bind

Enumerates values returned by several methods of Bind

CaptureContentForNoteResult

Defines result codes returned after an activity captures content for a note.

ClipDescriptionClassification

Defines the classification state of the content described by a ClipDescription.

DatabaseMode

Specifies configuration modes for the recent-suggestions database used by SearchRecentSuggestionsProvider.

DialogButtonType

Enumerates values returned by several types.

DialogButtonTypeObsoleted

Enumerates values returned by several types.

ExtraDockState

Enumerates values returned by several methods of ExtraDockState.

FileCreationMode

Enumerates values returned by several types and taken as a parameter of several types.

FillInFlags

Enumerates values returned by several types and taken as a parameter of the F:Android.Content.Intent.FillIn member.

IntentChooserContentType

Defines content types supported by the Android intent chooser.

IntentFilterPriority

Enumerates values returned by several types.

IntentUriType

Enumerates values returned by the UriIntentScheme, None, and Scheme members and taken as a parameter of the F:Android.Content.Intent.ParseUri, and F:Android.Content.Intent.ToUri members.

MatchResults

Defines match-result constants returned when an IntentFilter matches an intent.

NotifyChangeFlags

Specifies change details supplied when notifying observers through ContentResolver.

PackageContextFlags

Specifies options for creating a package context.

QuerySortDirection

Specifies the ordering direction for a query sort argument.

ReceiverFlags

Specifies registration options for a context-registered broadcast receiver.

RestrictionEntryType

Enumerates values returned by several types and taken as a parameter of the F:Android.Content.RestrictionEntry..ctor member.

RestrictionResults

Enumerates values returned by several methods of RestrictionResults.

SyncObserverType

Defines synchronization status categories reported by a sync-status observer.

TrimMemory

Enumerates values returned by several types and taken as a parameter of several types.

UriRelativeFilterGroupAction

Specifies whether a URI-relative filter group allows or blocks a matching URI.

UriRelativeFilterPart

Identifies the URI-relative part to which a filter applies.

Remarks

Includes contracts for component lifecycles, intent delivery, content providers and resolvers, clipboard data, shared preferences, and synchronization.

Java documentation for the android.content package.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.