Bug 32933 - Activity started from VS is started again from launcher
Summary: Activity started from VS is started again from launcher
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-08-10 20:12 UTC by Adam Kapos
Modified: 2016-12-22 22:50 UTC (History)
6 users (show)

Tags:
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 on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Adam Kapos 2015-08-10 20:12:19 UTC
If you start an application from Visual Studio and you try to resume the application from the launcher or the recent app list of your device, the app will not be resumed but will be restarted instead.

This makes it hard to debug the resuming scenario as the activities are not resumed but are created again.

Previously the app was resuming correctly when started from Visual Studio.

Occurs with and without debugging, in debug and release builds.

Note that static variables keep their values between the two starts, resulting in problems if activities are not designed to be created multiple times.

=== Reproduction ===
Create an Android project
Override OnCreate and OnResume
Place breakpoints in both
Start debugging (F5)
Note that OnCreate was called
Press the home button of the device and return to the application using the menu of your device
Note that OnCreate was called again instead of OnResume

Tested with:

Xamarin   3.11.590.0 (5160db7)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   5.1.3.1 (d419c934e6ce2113653ff4c40214e3a5d5a69440)
Visual Studio plugin to enable development for Xamarin.Android.
Comment 1 Adam Kapos 2015-08-10 20:20:59 UTC
Issue still present after updating to the latest stable:

Xamarin   3.11.836.0 (ed5c750)
Xamarin.Android   5.1.5.3 (f98871a95a479f6d71b3067b7e5834d41fcb2118)
Comment 2 Danish Akhtar 2015-08-21 03:21:05 UTC
Hi Adam,

Today, I have checked this issue after following the steps mentioned in bug description but not able to reproduce it, When I Press the home button of the device and return to the application using the menu of device then On Resume method is called not On create.

Here is the screencast for the same:http://www.screencast.com/t/SIfZizS5piq4

Please let me know, if I missed anything here.

Thanks

Environment info:
VS 2013
XVS 3.11.836
Win 8.1
Comment 3 Jose Gallardo 2016-12-22 22:50:53 UTC
Resolving as Not_Reproducible
Please feel free to reopen and provide the requested information if needed.
Thanks!