# 优化应用程序启动时间

> Explains how to use the Activity.reportFullyDrawn) API to enable Android to prioritize work that must complete before you application is initialized.

Android 设备可以优化应用程序的启动过程，以减少应用程序实现交互所需的时间。要使 Android 执行此操作，应用程序必须指示何时完成初始化并与终端用户交互。然后，Android 会优先考虑在初始化应用程序之前必须完成的工作。

Android 应用程序使用 [Activity.reportFullyDrawn](https://developer.android.com/reference/android/app/Activity#reportFullyDrawn\(\)) API 来指示它们已完成启动。默认情况下，Unity 在[唤醒](/engine/6000.0/script-reference/unity-engine/mono-behaviour/awake.md)之前加载第一个场景时调用此方法。但是，如果应用程序必须在用户与其交互之前执行一些额外的工作，例如，如果应用程序需要加载一些资源才能在屏幕上显示任何内容，则应在应用程序实现交互的帧上自行调用此 API。为此，请调用 [DiagnosticsReporting.CallReportFullyDrawn](/engine/6000.0/script-reference/unity-engine-android/diagnostics-reporting/call-report-fully-drawn.md)。如果在代码中的某个位置调用此方法，Unity 将不再在加载第一个场景时自动调用该方法。

**注意**：Android 仅将第一次调用 `CallReportFullyDrawn` 计入，因此没有理由多次调用它。
