Android Guides | Samples

Android.App Namespace

Contains high-level classes encapsulating the overall Android application model.

Remarks

Contains high-level classes encapsulating the overall Android application model.

An Android application is defined using one or more of Android's four core application components. Two such application components are defined in this package: Activity and Service. The other two components are from the Android.Content package: BroadcastReceiver and ContentProvider.

An Activity is an application component that provides a screen with which users can interact in order to do something, such as dial the phone, take a photo, send an email, or view a map. An activity can start other activities, including activities that live in separate applications.

A Service is an application component that can perform long-running operations in the background without a user interface. For example, a service can handle network transactions, play music, or work with a content provider without the user being aware of the work going on.

The Fragment class is also an important part of an application's design—especially when designing for large screen devices, such as tablets. A fragment defines a distinct part of an activity's behavior, including the associated UI. It has its own lifecycle that is similar to that of the activity and can exist alongside other fragments that are embedded in the activity. While an activity is running, you can add and remove fragments and include each fragment in a back stack that's managed by the activity—allowing the user to navigate backwards through the fragment states, without leaving the activity.

This package also defines application utilities, such as dialogs, notifications, and the action bar.

For information about using some the classes in this package, see the following documents: Activities, Services, Fragments, Using the Action Bar, Creating Dialogs, and Notifying the User.

Classes

TypeReason
ActionBarA primary toolbar within the activity that may display the activity title, application-level navigation affordances, and other interactive items.
ActionBar+IOnMenuVisibilityListenerListener for receiving events when action bar menus are shown or hidden.
ActionBar+IOnNavigationListenerListener interface for ActionBar navigation events.
ActionBar+ITabListenerCallback interface invoked when a tab is focused, unfocused, added, or removed.
ActionBar+LayoutParamsPer-child layout information associated with action bar custom views.
ActionBar+MenuVisibilityEventArgsProvides data for the ActionBar.MenuVisibility event.
ActionBar+NavigationEventArgs
ActionBar+TabA tab in the action bar.
ActionBar+TabEventArgsProvides data for the ActionBar+Tab.TabReselected, ActionBar+Tab.TabSelected, and ActionBar+Tab.TabUnselected events.
ActionBar+TabReselectedEventArgs
ActionBar+TabSelectedEventArgs
ActionBar+TabUnselectedEventArgs
ActionBarDisplayOptionsEnumerates values returned by several types and taken as a parameter of the ActionBar.SetDisplayOptions, and ActionBar.SetDisplayOptions members.
ActionBarNavigationModeEnumerates values returned by several types.
ActivityAn activity is a single, focused thing that the user can do.
Activity+InterfaceConsts
ActivityAttribute Generates a /manifest/application/activity element within AndroidManifest.xml.
ActivityGroupA screen that contains and runs multiple embedded activities.
ActivityManagerInteract with the overall activities running in the system.
ActivityManager+AppTask
ActivityManager+MemoryInfoInformation you can retrieve about the available memory through ActivityManager.GetMemoryInfo(MemoryInfo).
ActivityManager+MemoryInfo+InterfaceConsts
ActivityManager+ProcessErrorStateInfoInformation you can retrieve about any processes that are in an error condition.
ActivityManager+ProcessErrorStateInfo+InterfaceConsts
ActivityManager+RecentTaskInfoInformation you can retrieve about tasks that the user has most recently started or visited.
ActivityManager+RecentTaskInfo+InterfaceConsts
ActivityManager+RunningAppProcessInfoInformation you can retrieve about a running process.
ActivityManager+RunningAppProcessInfo+InterfaceConsts
ActivityManager+RunningServiceInfoInformation you can retrieve about a particular Service that is currently running in the system.
ActivityManager+RunningServiceInfo+InterfaceConsts
ActivityManager+RunningTaskInfoInformation you can retrieve about a particular task that is currently "running" in the system.
ActivityManager+RunningTaskInfo+InterfaceConsts
ActivityManager+TaskDescription
ActivityManager+TaskDescription+InterfaceConsts
ActivityOptionsHelper class for building an options Bundle that can be used with Context.StartActivity(Intent,Bundle) and related methods.
AlarmManagerThis class provides access to the system alarm services.
AlarmManager+AlarmClockInfo
AlarmManager+AlarmClockInfo+InterfaceConsts
AlarmTypeEnumerates values returned by several methods of AlarmType and taken as a parameter of several methods of AlarmManager.
AlertDialogA subclass of Dialog that can display one, two or three buttons.
AlertDialog+Builder
AliasActivityStub activity that launches another activity (and then finishes itself) based on information in its component's manifest meta-data.
ApplicationBase class for those who need to maintain global application state.
Application+IActivityLifecycleCallbacks
Application+InterfaceConsts
Application+IOnProvideAssistDataListenerCallback interface for use with Application.RegisterOnProvideAssistDataListener(IOnProvideAssistDataListener) and Application.UnregisterOnProvideAssistDataListener(IOnProvideAssistDataListener).
Application+ProvideAssistDataEventArgs
ApplicationAttribute Generates a /manifest/application element within AndroidManifest.xml.
ApplicationErrorReportDescribes an application error.
ApplicationErrorReport+AnrInfoDescribes an application not responding error.
ApplicationErrorReport+BatteryInfoDescribes a battery usage report.
ApplicationErrorReport+CrashInfoDescribes an application crash.
ApplicationErrorReport+InterfaceConsts
ApplicationErrorReport+RunningServiceInfoDescribes a running service report.
ApplicationErrorReportTypeEnumerates values returned by several types.
AppOpsManagerAPI for interacting with "application operation" tracking.
AppOpsManager+IOnOpChangedListener
AppOpsManager+OpChangedEventArgs
AppOpsManagerModeEnumerates values returned by several types.
BreadCrumbClickFlagsEnumerates values returned by the BreadCrumbClickFlags.None, and FragmentBreadCrumbs+BreadCrumbClickEventArgs.Flags members and taken as a parameter of the Android.App.FragmentBreadCrumbs.BreadCrumbClickEventArgs..ctor, and FragmentBreadCrumbs+IOnBreadCrumbClickListener.OnBreadCrumbClick members.
DatePickerDialogA simple dialog containing an DatePicker.
DatePickerDialog+DateSetEventArgs
DatePickerDialog+IOnDateSetListenerThe callback used to indicate the user is done filling in the date.
DefaultKeyEnumerates values returned by several methods of DefaultKey and taken as a parameter of the Activity.SetDefaultKeyMode member.
DialogBase class for Dialogs.
Dialog+InterfaceConsts
DialogFragmentA fragment that displays a dialog window, floating on top of its activity's window.
DialogFragmentStyleEnumerates values returned by several types and taken as a parameter of the DialogFragment.SetStyle member.
DisableCarModeFlagsEnumerates values returned by the DisableCarModeFlags.GoHome, DisableCarModeFlags.None, and UiModeManager.DisableCarModeGoHome members and taken as a parameter of the UiModeManager.DisableCarMode member.
DownloadErrorEnumerates values returned by several types.
DownloadManagerThe download manager is a system service that handles long-running HTTP downloads.
DownloadManager+QueryThis class may be used to filter download manager queries.
DownloadManager+RequestThis class contains all the information necessary to request a new download.
DownloadNetworkEnumerates values returned by several types and taken as a parameter of the DownloadManager+Request.SetAllowedNetworkTypes member.
DownloadPausedReasonEnumerates values returned by several types.
DownloadStatusEnumerates values returned by several types and taken as a parameter of the DownloadManager+Query.SetFilterByStatus member.
DownloadVisibilityEnumerates values returned by several types and taken as a parameter of the DownloadManager+Request.SetNotificationVisibility member.
EnableCarModeFlagsEnumerates values returned by several types and taken as a parameter of the UiModeManager.EnableCarMode member.
ExpandableListActivityAn activity that displays an expandable list of items by binding to a data source implementing the ExpandableListAdapter, and exposes event handlers when the user selects an item.
FragmentA Fragment is a piece of an application's user interface or behavior that can be placed in an Activity.
Fragment+InstantiationExceptionThrown by Fragment.Instantiate(Context,String,String) when there is an instantiation failure.
Fragment+InterfaceConsts
Fragment+SavedStateState information that has been retrieved from a fragment instance through FragmentManager.SaveFragmentInstanceState(Fragment).
Fragment+SavedState+InterfaceConsts
FragmentBreadCrumbsHelper class for showing "bread crumbs" representing the fragment stack in an activity.
FragmentBreadCrumbs+BreadCrumbClickEventArgsProvides data for the FragmentBreadCrumbs.BreadCrumbClick event.
FragmentBreadCrumbs+IOnBreadCrumbClickListenerInterface to intercept clicks on the bread crumbs.
FragmentManagerInterface for interacting with Fragment objects inside of an Activity

Developer Guides

While the FragmentManager API was introduced in Build+VERSION_CODES.Honeycomb, a version of the API at is also available for use on older platforms through NoType:android/support/v4/app/FragmentActivity;Href=../../../reference/android/support/v4/app/FragmentActivity.html.
FragmentManager+IBackStackEntryRepresentation of an entry on the fragment back stack, as created with FragmentTransaction.AddToBackStack(String).
FragmentManager+IOnBackStackChangedListenerInterface to watch for changes to the back stack.
FragmentTransactionAPI for performing a set of Fragment operations.
FragmentTransitEnumerates values returned by several methods of FragmentTransit and taken as a parameter of the Fragment.OnCreateAnimator, and FragmentTransaction.SetTransition members.
ImportanceEnumerates values returned by several types.
ImportanceReasonEnumerates values returned by several types.
InstrumentationBase class for implementing application instrumentation code.
Instrumentation+ActivityMonitorInformation about a particular kind of Intent that is being monitored.
Instrumentation+ActivityResultDescription of a Activity execution result to return to the original activity.
InstrumentationAttribute
IntentFilterAttribute Generates the //intent-filter element within AndroidManifest.xml.
IntentService
KeyguardManagerClass that can be used to lock and unlock the keyboard.
KeyguardManager+IOnKeyguardExitResultCallback passed to KeyguardManager.ExitKeyguardSecurely(IOnKeyguardExitResult) to notify caller of result.
KeyguardManager+KeyguardLock
LauncherActivityDisplays a list of all activities which can be performed for a given intent.
LauncherActivity+IconResizerUtility class to resize icons to match default icon size.
LauncherActivity+ListItemAn item in the list
ListActivityAn activity that displays a list of items by binding to a data source such as an array or Cursor, and exposes event handlers when the user selects an item.
ListFragmentA fragment that displays a list of items by binding to a data source such as an array or Cursor, and exposes event handlers when the user selects an item.
LoaderManagerInterface associated with an Activity or Fragment for managing one or more Loader instances associated with it.
LoaderManager+ILoaderCallbacksCallback interface for a client to interact with the manager.
LocalActivityManager
MediaRouteActionProviderThe media route action provider displays a MediaRouteButton in the application's ActionBar to allow the user to select routes and to control the currently selected route.
MediaRouteButton [Android Documentation]
MetaDataAttribute Generates the //meta-data element within AndroidManifest.xml.
MoveTaskFlagsEnumerates values returned by the MoveTaskFlags.NoUserAction, and MoveTaskFlags.WithHome members and taken as a parameter of the ActivityManager.MoveTaskToFront, and ActivityManager.MoveTaskToFront members.
NativeActivityConvenience for implementing an activity that will be implemented purely in native code.
NotificationA class that represents how a persistent notification is to be presented to the user using the NotificationManager.
Notification+Action
Notification+Action+Builder
Notification+Action+IExtender
Notification+Action+InterfaceConsts
Notification+Action+WearableExtender
Notification+BigPictureStyleHelper class for generating large-format notifications that include a large image attachment.
Notification+BigTextStyleHelper class for generating large-format notifications that include a lot of text.
Notification+BuilderBuilder class for Notification objects.
Notification+IExtender
Notification+InboxStyleHelper class for generating large-format notifications that include a list of (up to 5) strings.
Notification+InterfaceConsts
Notification+MediaStyleNotification style for media playback notifications.
Notification+StyleAn object that can apply a rich notification style to a Notification+Builder object.
Notification+WearableExtender
NotificationDefaultsEnumerates values returned by several types and taken as a parameter of the Notification+Builder.SetDefaults member.
NotificationFlagsEnumerates values returned by several types.
NotificationManagerClass to notify the user of events that happen.
NotificationPriorityEnumerates values returned by several types.
NotificationVisibilityEnumerates values returned by several types and taken as a parameter of the Notification+Builder.SetVisibility member.
PendingIntentA description of an Intent and target action to perform with it.
PendingIntent+CanceledExceptionException thrown when trying to send through a PendingIntent that has been canceled or is otherwise no longer able to execute the request.
PendingIntent+InterfaceConsts
PendingIntent+IOnFinishedCallback interface for discovering when a send operation has completed.
PendingIntentFlagsEnumerates values returned by several methods of PendingIntentFlags and taken as a parameter of several types.
PermissionAttribute
PermissionGroupAttribute
PermissionTreeAttribute
PopBackStackFlagsEnumerates values returned by the FragmentManager.PopBackStackInclusive, PopBackStackFlags.Inclusive, and PopBackStackFlags.None members and taken as a parameter of several methods of FragmentManager.
PresentationBase class for presentations.
ProcessErrorEnumerates values returned by several types.
ProgressDialog
ProgressDialogStyleEnumerates values returned by the ProgressDialogStyle.Horizontal, and ProgressDialogStyle.Spinner members and taken as a parameter of the ProgressDialog.SetProgressStyle member.
RecentTaskFlagsEnumerates values returned by the RecentTaskFlags.IgnoreUnavailable, and RecentTaskFlags.WithExcluded members and taken as a parameter of the ActivityManager.GetRecentTasks member.
RemoteInputA RemoteInput object specifies input to be collected from a user to be passed along with an intent inside a PendingIntent that is sent.
RemoteInput+Builder
RemoteInput+InterfaceConsts
ResultEnumerates values returned by several types and taken as a parameter of several types.
SearchableInfoSearchability meta-data for an activity.
SearchableInfo+InterfaceConsts
SearchManagerThis class provides access to the system search services.
SearchManager+IOnCancelListenerSee SearchManager.SetOnCancelListener(IOnCancelListener) for configuring your activity to monitor search UI state.
SearchManager+IOnDismissListenerSee SearchManager.SetOnDismissListener(IOnDismissListener) for configuring your activity to monitor search UI state.
ServiceA Service is an application component representing either an application's desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use.
Service+InterfaceConsts
ServiceAttribute Generates a /manifest/application/service element within AndroidManifest.xml.
ServiceInfoFlagsEnumerates values returned by several types.
SharedElementCallbackListener provided in Activity.SetEnterSharedElementCallback(SharedElementCallback) and Activity.SetExitSharedElementCallback(SharedElementCallback) as well as Fragment.SetEnterSharedElementCallback(SharedElementCallback) and Fragment.SetExitSharedElementCallback(SharedElementCallback) to monitor the Shared element transitions.
StartCommandFlagsEnumerates values returned by the StartCommandFlags.Redelivery, and StartCommandFlags.Retry members and taken as a parameter of the Service.OnStartCommand, and SettingInjectorService.OnStartCommand members.
StartCommandResultEnumerates values returned by several types.
SupportsGLTextureAttribute
TabActivity
TaskStackBuilderUtility class for constructing synthetic back stacks for cross-task navigation on Android 3.0 and newer.
TimePickerDialogA dialog that prompts the user for the time of day using a TimePicker.
TimePickerDialog+IOnTimeSetListenerThe callback interface used to indicate the user is done filling in the time (they clicked on the 'Set' button).
TimePickerDialog+TimeSetEventArgs
UiAutomationClass for interacting with the device's UI by simulation user actions and introspection of the screen content.
UiAutomation+AccessibilityEventEventArgsProvides data for the UiAutomation.AccessibilityEvent event.
UiAutomation+IAccessibilityEventFilterListener for filtering accessibility events.
UiAutomation+IOnAccessibilityEventListenerListener for observing the AccessibilityEvent stream.
UiAutomationRotationEnumerates values returned by several types and taken as a parameter of the UiAutomation.SetRotation member.
UiModeManagerThis class provides access to the system uimode services.
UiNightModeEnumerates values returned by several types.
UsesFeatureAttribute
UsesLibraryAttribute
UsesPermissionAttribute
WallpaperInfoThis class is used to specify meta information of a wallpaper service.
WallpaperInfo+InterfaceConsts
WallpaperManagerProvides access to the system wallpaper.
WearableSizePresetEnumerates values returned by several types and taken as a parameter of the Notification+WearableExtender.SetCustomSizePreset member.