Stay organized with collections
Save and categorize content based on your preferences.
ArchivedActivityInfo
class ArchivedActivityInfo
Contains fields required to show archived package in Launcher.
Summary
Public constructors
Public methods
getComponentName
fun getComponentName(): ComponentName
The component name of this activity.
getIcon
fun getIcon(): Drawable?
Icon of the activity in the app's locale. if null then the default icon would be shown in the launcher.
getLabel
fun getLabel(): CharSequence
The label for the activity.
getMonochromeIcon
fun getMonochromeIcon(): Drawable?
Monochrome icon, if defined, of the activity.
Return |
Drawable? |
This value may be null . |
setIcon
fun setIcon(value: Drawable): ArchivedActivityInfo
Icon of the activity in the app's locale. if null then the default icon would be shown in the launcher.
Parameters |
value |
Drawable: This value cannot be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# ArchivedActivityInfo\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nArchivedActivityInfo\n====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/content/pm/ArchivedActivityInfo \"View this page in Java\") \n\n```\nclass ArchivedActivityInfo\n```\n\n|---|----------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.content.pm.ArchivedActivityInfo](#) |\n\nContains fields required to show archived package in Launcher.\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [ArchivedActivityInfo](#ArchivedActivityInfo(kotlin.CharSequence,%20android.content.ComponentName))`(`label:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)`, `componentName:` `[ComponentName](../ComponentName.html#)`)` \u003cbr /\u003e |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ComponentName](../ComponentName.html#) | [getComponentName](#getComponentName())`()` The component name of this activity. |\n| [Drawable](../../graphics/drawable/Drawable.html#)? | [getIcon](#getIcon())`()` Icon of the activity in the app's locale. |\n| [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html) | [getLabel](#getLabel())`()` The label for the activity. |\n| [Drawable](../../graphics/drawable/Drawable.html#)? | [getMonochromeIcon](#getMonochromeIcon())`()` Monochrome icon, if defined, of the activity. |\n| [ArchivedActivityInfo](#) | [setComponentName](#setComponentName(android.content.ComponentName))`(`value:` `[ComponentName](../ComponentName.html#)`)` The component name of this activity. |\n| [ArchivedActivityInfo](#) | [setIcon](#setIcon(android.graphics.drawable.Drawable))`(`value:` `[Drawable](../../graphics/drawable/Drawable.html#)`)` Icon of the activity in the app's locale. |\n| [ArchivedActivityInfo](#) | [setLabel](#setLabel(kotlin.CharSequence))`(`value:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)`)` The label for the activity. |\n| [ArchivedActivityInfo](#) | [setMonochromeIcon](#setMonochromeIcon(android.graphics.drawable.Drawable))`(`value:` `[Drawable](../../graphics/drawable/Drawable.html#)`)` Monochrome icon, if defined, of the activity. |\n\nPublic constructors\n-------------------\n\n### ArchivedActivityInfo\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nArchivedActivityInfo(\n label: CharSequence, \n componentName: ComponentName)\n```\n\n| Parameters ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------|\n| `label` | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html): This value cannot be `null`. |\n| `componentName` | [ComponentName](../ComponentName.html#): This value cannot be `null`. |\n\nPublic methods\n--------------\n\n### getComponentName\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getComponentName(): ComponentName\n```\n\nThe component name of this activity.\n\n| Return ||\n|-----------------------------------------|------------------------------|\n| [ComponentName](../ComponentName.html#) | This value cannot be `null`. |\n\n### getIcon\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getIcon(): Drawable?\n```\n\nIcon of the activity in the app's locale. if null then the default icon would be shown in the launcher. \n\n### getLabel\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getLabel(): CharSequence\n```\n\nThe label for the activity.\n\n| Return ||\n|-----------------------------------------------------------------------------------------------|------------------------------|\n| [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html) | This value cannot be `null`. |\n\n### getMonochromeIcon\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getMonochromeIcon(): Drawable?\n```\n\nMonochrome icon, if defined, of the activity.\n\n| Return ||\n|-----------------------------------------------------|---------------------------|\n| [Drawable](../../graphics/drawable/Drawable.html#)? | This value may be `null`. |\n\n### setComponentName\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setComponentName(value: ComponentName): ArchivedActivityInfo\n```\n\nThe component name of this activity.\n\n| Parameters ||\n|---------|-----------------------------------------------------------------------|\n| `value` | [ComponentName](../ComponentName.html#): This value cannot be `null`. |\n\n| Return ||\n|---------------------------|------------------------------|\n| [ArchivedActivityInfo](#) | This value cannot be `null`. |\n\n### setIcon\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setIcon(value: Drawable): ArchivedActivityInfo\n```\n\nIcon of the activity in the app's locale. if null then the default icon would be shown in the launcher.\n\n| Parameters ||\n|---------|----------------------------------------------------------------------------------|\n| `value` | [Drawable](../../graphics/drawable/Drawable.html#): This value cannot be `null`. |\n\n### setLabel\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setLabel(value: CharSequence): ArchivedActivityInfo\n```\n\nThe label for the activity.\n\n| Parameters ||\n|---------|-----------------------------------------------------------------------------------------------------------------------------|\n| `value` | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html): This value cannot be `null`. |\n\n| Return ||\n|---------------------------|------------------------------|\n| [ArchivedActivityInfo](#) | This value cannot be `null`. |\n\n### setMonochromeIcon\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setMonochromeIcon(value: Drawable): ArchivedActivityInfo\n```\n\nMonochrome icon, if defined, of the activity.\n\n| Parameters ||\n|---------|----------------------------------------------------------------------------------|\n| `value` | [Drawable](../../graphics/drawable/Drawable.html#): This value cannot be `null`. |\n\n| Return ||\n|---------------------------|------------------------------|\n| [ArchivedActivityInfo](#) | This value cannot be `null`. |"]]