Application Current Properties on Android are preserved between installs

I have a weird situation where the Application.Current.Properties are getting preserved between installs for android devices.

This only happens in my Release version and only after re-installing the app on an android device.

I verified this is the case by doing this:

  • I added a new data member to my app cache and called it userAppGUID
  • When I reinstall the app I send a custom event to application insights that tells me the state of any cache data in the device. I get this:
    AppCachedValue1 - {"userCameFromSmartLink":"True","teamId":"5729649","smartLinkId":"32342","userAppGUID":""}
    this tells me that I'm reading the previous state of the app before the userAppGUID member existed.

  • Then I read the AppCachedValue after I initialize userAppGUID and get the following:
    AppCachedValue2 - {"userCameFromSmartLink":"True","teamId":"5729649","smartLinkId":"32342","userAppGUID":"91717fcc-0801-4dbd-ab5f-d5179c219823"}

  • If I then clear data and cache for my app and re-run I get this:
    AppCachedValue1 - {"userCameFromSmartLink":"False","teamId":"0","smartLinkId":"0","userAppGUID":""}

  • If I uninstall the app and re-install it I get the original values! :(
    AppCachedValue1 - {"userCameFromSmartLink":"True","teamId":"5729649","smartLinkId":"32342","userAppGUID":""}

I've read that the cache/data for any app is deleted between re-installs. Is that not true under certain circumstances?

Thanks,
Hector

Sign In or Register to comment.