|Summary:||OnAppearing/Disappearing triggers for all pages in navigationstack backgrounding/foregrounding app|
|Product:||Forms||Reporter:||Björn Bentmar <bjorn.bentmar>|
|Severity:||normal||CC:||adrianknight89, alan.clark, bellju, bjorn.bentmar, brendan.zagaeski, bugzilla.xamarin, chrisntr, david, davrdavr, dominic, jason.smith, jens.christian, jordan.foo, parmendrak, rui.marinho, samantha.houts, shane94, taylors, zameem|
|Tags:||ac||Is this bug a regression?:||Yes|
|Last known good build:||2.1.06529|
XF2.2 solution with android project
Description Björn Bentmar 2016-05-26 07:44:54 UTC
Created attachment 16109 [details] XF2.2 solution with android project This bug came in XF 2.2 and only happens when using FormsAppCompatActivity. What happens in that all pages that are alive call onappearing/disappearing when you toggle outside app OR change activity when taking photos with Xam.Plugin.Media for example. The appearing calls trigger even after removing a Page from navigation stack with Navigation.RemovePage(), this is also shown in my repro. The bug is both on emulators and harware pre and post lollipop. If you use the standard FormsApplicationActivity everything works just like its supposed to. I´ve added a repro that perfectly shows you this. This forced me to dowgrade many of my projects since logic in appearing/disappearing events went totally crazy resulting in breaking my apps. Ive also tested the latest prerelease of XF2.3 and its the same thing there. Because this causes all pages in stack to call appearing when going back to app, the acutal appearing is not called when its actually appearing, same thing for disappearing. Please fix this!
Comment 1 Björn Bentmar 2016-05-26 08:22:15 UTC
Comment 3 Taylor 2016-07-25 18:18:38 UTC
Any update on this? It's causing us quite a few problems as we launch the camera frequently and rely on the onAppearing once the camera has been dismissed.
Comment 4 Björn Bentmar 2016-08-01 17:57:23 UTC
Nothing has been done to solve it (based on what Xamarin has released)...
Comment 5 Jordan Foo 2016-08-29 02:59:14 UTC
Hi All, I've also filed a bug that's different to reproduce, but exposes the same observed behaviour - All pages in the navigation page firing OnAppearing event. However, for the reported bug, it occurs for both FormsAppCompatActivity & FormsApplicationActivity. https://bugzilla.xamarin.com/show_bug.cgi?id=43815
Comment 6 adrianknight89 2016-09-10 16:22:27 UTC
I have this issue when I hit the power button to lock the screen. When I unlock, onappearing of previous pages will be called. :(
Comment 7 adrianknight89 2016-09-10 16:23:28 UTC
Created attachment 17407 [details] repro Navigate to Page2 and then lock the screen. When you unlock, keyboard from Page1 will show.
Comment 8 adrianknight89 2016-09-10 21:52:57 UTC
I submitted a PR in case it fixes your use cases. Please see https://github.com/xamarin/Xamarin.Forms/pull/342
Comment 9 Björn Bentmar 2016-09-14 10:10:37 UTC
I tested the dlls from made from the PR on my repro. And it works like its supposed to! :D Please Xamarin include this fix asap :)
Comment 10 Samantha Houts 2016-09-30 23:12:59 UTC
Should be fixed in 2.3.4-pre1. Thank you!
Comment 11 Björn Bentmar 2016-09-30 23:17:13 UTC
GREAT! Thank you! :D
Comment 12 Parmendra Kumar 2016-12-01 14:09:46 UTC
I have checked this issue with Xamarin.Forms 2.3.4-pre1 and I have used sample attached in comment #7 and followed instruction and observed that this issue has been fixed. Hence closing this issue. Thanks.
Comment 13 Samantha Houts 2016-12-01 19:33:41 UTC
*** Bug 48517 has been marked as a duplicate of this bug. ***
Comment 14 Zafar 2016-12-21 20:59:03 UTC
Checked the issue with Xamarin.Forms 188.8.131.52-pre1, still getting reproduced. Please reopen the bug
Comment 15 Brendan Zagaeski (Xamarin Support) 2016-12-21 21:15:19 UTC
## Preliminary quick review of Comment 14 Note that unless the original test case from Comment 1 or Comment 7 still replicates the issue, then the best next step for Comment 14 will be to file a new bug report that includes a new test case that replicates the problem. (If any of the CC list members of the bug gets a chance to double-check the earlier test cases from Comment 1 and Comment 7, that would be a good step too.) Thanks in advance!
Comment 16 Jens-Christian 2017-02-06 14:19:19 UTC
Bug is not fixed in all cases, see https://bugzilla.xamarin.com/show_bug.cgi?id=52318
Comment 17 Diego 2017-03-10 17:59:37 UTC
Tested in version 184.108.40.206-pre4 this bug remains. Please reopen