Share via


ActivatedOperation.GetDeferral Method

Definition

Requests that the completion of app activation be delayed.

public:
 virtual ActivatedDeferral ^ GetDeferral() = GetDeferral;
ActivatedDeferral GetDeferral();
public ActivatedDeferral GetDeferral();
function getDeferral()
Public Function GetDeferral () As ActivatedDeferral

Returns

The activation deferral object.

Remarks

When an app starts, the system displays its splash screen until the app indicates that it is ready to display its UI by returning from its activation handler. The app has several seconds to set up its state and initial UI. The UI for the app is displayed to the user when the app returns from its activation handler. However, some apps need to start asynchronous operations to retrieve state information and set up their UI (like using fragment loading to display app pages). Apps that must complete activation asynchronously can get a deferral object from the activation event arguments. This object enables the app to complete activation outside its handler. When the app acquires the deferral object, its activation is not completed when the activation handler returns.

An app can complete activation after its required asynchronous operations complete and it is ready to display its UI. App activation is delayed until the app calls the ActivatedDeferral.complete method.

Requesting a deferral enables an app to display its static splash screen for up to 15 seconds. If the app hasn't completed activation after 15 seconds, the system considers the app hung and will terminate it if the user navigates away from the splash screen.

Note that in normal circumstances and app should take no more than a few seconds to finish activation. If your app requires more than 3 or 4 seconds to restore state and prepare its UI, then you should finish activation and display an extended splash screen screen until your app is ready.

Applies to

See also