Stay organized with collections
Save and categorize content based on your preferences.
ZygotePreload
public
interface
ZygotePreload
android.app.ZygotePreload
|
This is the interface to be implemented for the class that is specified by the
android:zygotePreloadName
of the <application> tag.
It is responsible for preloading application code and data, that will be shared by all
isolated services that have the
android:useAppZygote
attribute
of the <service> tag set to true
.
Note that implementations of this class must provide a default constructor with no arguments.
Summary
Public methods |
abstract
void
|
doPreload(ApplicationInfo appInfo)
This method is called once every time the Application Zygote is started.
|
Public methods
doPreload
public abstract void doPreload (ApplicationInfo appInfo)
This method is called once every time the Application Zygote is started. It is normally
started the first time an isolated service that uses it is started. The Application Zygote
will be stopped when all isolated services that use it are stopped.
Parameters |
appInfo |
ApplicationInfo : The ApplicationInfo object belonging to the application
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,["# ZygotePreload\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nZygotePreload\n=============\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/app/ZygotePreload \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\n\ninterface\nZygotePreload\n`\n\n\n`\n\n\n`\n\n|---------------------------|\n| android.app.ZygotePreload |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThis is the interface to be implemented for the class that is specified by the\n[android:zygotePreloadName](/reference/android/R.styleable#AndroidManifestApplication_zygotePreloadName) of the \\\u003capplication\\\u003e tag.\n\nIt is responsible for preloading application code and data, that will be shared by all\nisolated services that have the\n[android:useAppZygote](/reference/android/R.styleable#AndroidManifestService_useAppZygote) attribute\nof the \\\u003cservice\\\u003e tag set to `true`.\n\nNote that implementations of this class must provide a default constructor with no arguments.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[doPreload](/reference/android/app/ZygotePreload#doPreload(android.content.pm.ApplicationInfo))`(`[ApplicationInfo](/reference/android/content/pm/ApplicationInfo)` appInfo) ` This method is called once every time the Application Zygote is started. |\n\nPublic methods\n--------------\n\n### doPreload\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void doPreload (ApplicationInfo appInfo)\n```\n\nThis method is called once every time the Application Zygote is started. It is normally\nstarted the first time an isolated service that uses it is started. The Application Zygote\nwill be stopped when all isolated services that use it are stopped.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|----------------------------------------------------------------------------------------------------------------|\n| `appInfo` | `ApplicationInfo`: The ApplicationInfo object belonging to the application This value cannot be `null`. \u003cbr /\u003e |"]]