Android Guides | Samples

Android.Content.ComponentName Class

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

See Also: ComponentName

Syntax

[Android.Runtime.Register("android/content/ComponentName", DoNotGenerateAcw=true)]
public sealed class ComponentName : Object, IParcelable, ICloneable, IComparable, IDisposable

Remarks

Identifier for a specific application component (Activity, Service, BroadcastReceiver, or ContentProvider) that is available. Two pieces of information, encapsulated here, are required to identify a component: the package (a String) it exists in, and the class (a String) name inside of that package.

[Android Documentation]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Content.ComponentName are listed below.

See Also: Object

Public Constructors

Instantiate a new ComponentName from the data in a Parcel that was previously written with ComponentName.WriteToParcel(Parcel,ParcelableWriteFlags).
Create a new component identifier from a Context and class name.
Create a new component identifier.

Public Properties

[read-only]
ClassNameString. Return the class name of this component.
[read-only]
static
CreatorIParcelableCreator.
[read-only]
PackageNameString. Return the package name of this component.
[read-only]
ShortClassNameString. Return the class name, either fully qualified or in a shortened form (with a leading '.') if it is a suffix of the package.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Clone() : ComponentName
Creates and returns a copy of this Object.
CompareTo(ComponentName) : Int32
DescribeContents() : Int32
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
FlattenToShortString() : String
The same as ComponentName.FlattenToString, but abbreviates the class name if it is a suffix of the package.
FlattenToString() : String
Return a String that unambiguously describes both the package and class names contained in the ComponentName.
static
ReadFromParcel(Parcel) : ComponentName
Read a ComponentName from a Parcel that was previously written with ComponentName.WriteToParcel(ComponentName,Parcel), returning either a null or new object as appropriate.
ToShortString() : String
Return string representation of this class without the class's name as a prefix.
static
UnflattenFromString(String) : ComponentName
Recover a ComponentName from a String that was previously created with ComponentName.FlattenToString.
static
WriteToParcel(ComponentName, Parcel)
Write a ComponentName to a Parcel, handling null pointers.
WriteToParcel(Parcel, ParcelableWriteFlags)
Flatten this object in to a Parcel.

Explicitly Implemented Interface Members