Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method "OnAppearing" for ContentPage not called after application is resumed #23401

Closed
TWEESTY opened this issue Jul 2, 2024 · 3 comments
Closed
Labels
migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 t/bug Something isn't working

Comments

@TWEESTY
Copy link

TWEESTY commented Jul 2, 2024

Description

When the application is resumed (i.e. when the application is putting on the front after being in the background), the method "OnAppearing" of the current page is not called. The behavior is different from Xamarin.

Steps to Reproduce

Put a breakpoint inside the method "OnAppearing" of the page "MainPage.xaml.cs"
Launch the application
The breakpoint is hit.
Then, put the application in background, then return to the application => the breakpoint is not hit.

Link to public reproduction project repository

https://github.com/TWEESTY/MAUI_Issue_OnAppearing

Version with bug

8.0.3 GA

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android 13

Did you find any workaround?

No

Relevant log output

No response

@TWEESTY TWEESTY added the t/bug Something isn't working label Jul 2, 2024
Copy link
Contributor

github-actions bot commented Jul 2, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@SmartmanApps
Copy link

Maybe related #15767

@PureWeen
Copy link
Member

PureWeen commented Jul 2, 2024

The behavior is different from Xamarin.

This behavior is only different on Android.

For iOS and Windows "OnAppearing" didn't fire in XF when an app was backgrounded and then brought back into the foreground.

If you want to listen to lifecycle events on the window, I'd recommend accessing the Window property or wiring into the lifecycle events on the builder

@PureWeen PureWeen closed this as not planned Won't fix, can't repro, duplicate, stale Jul 2, 2024
@samhouts samhouts added platform/android 🤖 migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert labels Jul 3, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants