ActivityManager.AddApplicationStartInfoCompletionListener Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a callback that is notified when the ApplicationStartInfo record of this startup
is complete.
[Android.Runtime.Register("addApplicationStartInfoCompletionListener", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetAddApplicationStartInfoCompletionListener_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler", ApiSince=35)]
public virtual void AddApplicationStartInfoCompletionListener(Java.Util.Concurrent.IExecutor executor, Java.Util.Functions.IConsumer listener);
[<Android.Runtime.Register("addApplicationStartInfoCompletionListener", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetAddApplicationStartInfoCompletionListener_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler", ApiSince=35)>]
abstract member AddApplicationStartInfoCompletionListener : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
override this.AddApplicationStartInfoCompletionListener : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
Parameters
- executor
- IExecutor
The executor on which the listener should be called.
- listener
- IConsumer
Callback to be called when collection of ApplicationStartInfo is
complete. Will replace existing listener if one is already attached.
- Attributes
Remarks
Adds a callback that is notified when the ApplicationStartInfo record of this startup is complete. The startup is considered complete when the first frame is drawn.
The callback doesn't wait for Activity#reportFullyDrawn to occur. Retrieve a copy of ApplicationStartInfo after Activity#reportFullyDrawn is called (using this callback or getHistoricalProcessStartReasons) if you need the ApplicationStartInfo.START_TIMESTAMP_FULLY_DRAWN timestamp.
If the current start record has already been completed (that is, the process is not currently starting), the callback will be invoked immediately on the specified executor with the previously completed ApplicationStartInfo record.
Callback will be called at most once and removed automatically after being triggered.
Note: callback is asynchronous and should be made from a background thread.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.