Hello,
now how can i know app disappear and appear on android13
For the Disappearing and Appearing methods, the use case is page navigation events.
Disappearing is raised when the page disappears due to navigating away from the page within the app. It is not raised when the app disappears due to an event external to the app (e.g. user navigates to the home screen or another app, a phone call is received, the device is locked, the device is turned off).
For your use case, it is more recommended to use lifecycle events.
Please refer to the following documentation and code sample:
protected override Window CreateWindow(IActivationState activationState)
{
Window window = base.CreateWindow(activationState);
window.Stopped += (s, e) =>
{
Console.WriteLine("Stopped");
};
window.Resumed += (s, e) =>
{
Console.WriteLine("Resumed");
};
return window;
}
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.