Bug 39327 - Application.Current.Properties does not persist on Android
Summary: Application.Current.Properties does not persist on Android
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-03-03 17:59 UTC by Cody Beyer (MSFT)
Modified: 2016-04-21 14:02 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Sample (45.87 KB, application/zip)
2016-03-03 17:59 UTC, Cody Beyer (MSFT)
Details


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 or GitHub 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:
VERIFIED FIXED

Description Cody Beyer (MSFT) 2016-03-03 17:59:46 UTC
Created attachment 15238 [details]
Sample

# Description

The following sample app demonstrates an issue where properties do not persist across runs on Android. This does not occur on iOS, where properties do persist as expected

# Sample

Attached

# Steps to Reproduce

1. Download sample
2. Set breakpoint at line 31 of SaveStateBug.cs
3. Deploy to Android
4. Continue through breakpoint
5. End debug and close app
6. Debug again
7. Step into breakpoint
8. Evaluate Xamarin.Forms.Application.Properties\[CodyTest]


# Expected Results

Evaluation should show a value of 1

# Actual Results

Evaluation shows no array set

# Versions

=== Xamarin Studio ===

Version 6.0 (build 4520)
Installation UUID: ae0fa433-e78e-4353-a756-7b47170e264a
Runtime:
	Mono 4.3.2 (mono-4.3.2-branch/ba2e5e4) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 403020467

=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.2.1 (9548.1)
Build 7C1002

=== Xamarin.iOS ===

Version: 9.4.1.25 (Business Edition)
Hash: 962a050
Branch: master
Build date: 2016-01-29 16:59:11-0500

=== Xamarin.Android ===

Version: 6.0.1.10 (Business Edition)
Android SDK: /Users/codybeyer/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		6.0   (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.1

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.4.1.6 (Business Edition)

=== Build Information ===

Release ID: 600004520
Git revision: a354b2cb9df4b96f50b0ccb960dbdd5a9155510c
Build date: 2016-02-18 14:52:07-05
Xamarin addins: 8e54979f23feee160d245a3c33e43e77779b1eb4
Build lane: monodevelop-lion-master

=== Operating System ===

Mac OS X 10.11.3
Darwin clb-mbp.local 15.3.0 Darwin Kernel Version 15.3.0
	Thu Dec 10 18:40:58 PST 2015
	root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2016-03-03 20:42:59 UTC
At first glance this looks like it might be a duplicate of Bug 36771.
Comment 2 Jason Smith [MSFT] 2016-03-10 19:46:34 UTC
Should be fixed in 2.2.0-pre1
Comment 3 Rajneesh Kumar 2016-04-21 14:02:42 UTC
I have checked this issue with the XF 2.2.0.23-pre4 and follow the steps provided in the bug description. I observed that Evaluation should show a value of 1.

Screencast: http://www.screencast.com/t/ILKaBKCMEnMD

This issue has been fixed, hence I am closing this issue. Also if any one face this issue again so feel free to reopen it OR file a seperate bug for the same.

Thanks..!