Bug 60965 - Android Hardware Back Button to Close App Causes App.cs Constructor To Trigger When The App Is Resumed From The Background & OnResume Does Not Trigger
Summary: Android Hardware Back Button to Close App Causes App.cs Constructor To Trigge...
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.5.0
Hardware: PC Mac OS
: Normal major
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-12-04 02:51 UTC by Brandon Minnick
Modified: 2017-12-04 05:25 UTC (History)
2 users (show)

Tags: xamextfollowed, back, onresume, ac
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 60965 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Brandon Minnick 2017-12-04 02:51:42 UTC
Reproduction Steps:
1 - Download the Sample App (linked below)
2 - Build/Deploy Android Project to a device or simulator
3 - After the app launches, confirm 3 tabs in the TabbedPage
4 - Tap the Android Home button to dismiss the app
5 - Confirm the app has been backgrounded
6 - Relaunch the app from the background
7 - Confirm Alert Appears: "OnResume Triggered"
8 - Tap "OK" on the Alert
9 - Tap the Android hardware back button
10 - Confirm the app has been backgrounded
11 - Relaunch the app from the background
12 - After the app relaunches, confirm 6 tabs in the TabbedPage & no Alert appears

Sample App
https://github.com/brminnick/RepeatTabsReproductionSample

Environment Information
=== Visual Studio Enterprise 2017 for Mac ===

Version 7.2.2 (build 11)
Installation UUID: 6e5142b4-e8be-4d1c-b75e-4744b0d8c3de
Runtime:
	Mono 5.4.1.6 (2017-06/1f4613aa1ac) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 504010006

=== NuGet ===

Version: 4.3.1.4445

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	2.0.0
	1.1.1
	1.0.4
SDK: /usr/local/share/dotnet/sdk/2.0.0/Sdks
SDK Versions:
	2.0.0
	1.0.1
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.6
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 9.1 (13532)
Build 9B55

=== Xamarin.iOS ===

Version: 11.3.0.47 (Visual Studio Enterprise)
Hash: 51128b8c
Branch: xcode9.1
Build date: 2017-10-31 22:42:13-0400

=== Xamarin.Android ===

Version: 8.0.2.1 (Visual Studio Enterprise)
Android SDK: /Users/brandonm/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.1   (API level 16)
		6.0   (API level 23)
		7.0   (API level 24)
		7.1   (API level 25)
		8.0   (API level 26)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 26.0.2
SDK Build Tools Version: 26.0.2

Java SDK: /usr
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin.Mac ===

Version: 3.8.1.0 (Visual Studio Enterprise)

=== Xamarin Inspector ===

Version: 1.3.2
Hash: 461f09a
Branch: 1.3-release
Build date: Tue, 03 Oct 2017 18:26:57 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 702020011
Git revision: b604c37c5a4a2f0919b45ffbe2aaad9fe040af31
Build date: 2017-11-01 08:31:43-04
Xamarin addins: d57dc14cbd4eb166ee62bab585965ab78d3650bc
Build lane: monodevelop-lion-d15-4

=== Operating System ===

Mac OS X 10.13.1
Darwin 17.2.0 Darwin Kernel Version 17.2.0
    Fri Sep 29 18:27:05 PDT 2017
    root:xnu-4570.20.62~3/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Azure Functions development (Preview) 7.2
NuGet Package Management Extensions 0.12.2
Internet of Things (IoT) development (Preview) 7.1