Forum Xamarin Xamarin.Android

Preserve application data/cache on device between deploys is not working

I'm using Xamarin.Forms and I have issues with my Android project, that when I debug my application on my phone (Galaxy s8), everytime I run the application, I loose all the settings. I checked and "Preserve application data/cache on device between deploys" setting is checked.

In the past this was not a problem. But now I'm not able to solve this. I'm not sure what changed. I updated all the packages of Xamarin.* to the latest version.

Tagged:

Posts

  • julien_BEjulien_BE Member ✭✭
    edited January 2019

    Hello @MaticDia ,

    I'm having the same issue with my Galaxy S8. I also verified "Preserve application data/cache on device between deploys". It is checked.

    When I'm trying with an Android emulator, it works, data is preserved. But when I try with my Galaxy S8, data is lost between the deploys!

    Issue occurs with both Xamarin Studio (mac) or with Visual Studio (windows).

    Did you find a solution?

    Julien

  • MaticDiaMaticDia SIMember ✭✭

    Hi,
    unfortunately I haven't found the solution. But I'm sure this was working few months ago and then I stopped working on this project. In the mean time I updated Visual Studio and now it's not working anymore.

  • Having the same issue with Samsung Galaxy S7...

  • MyClockMyClock Member ✭✭

    Ive just started uploading my app to the windows store to test, and after downloading, it wiped all my app sql db data and the settings (stored with xam.plugin.settings), presumably because it uninstalled and re-installed. obviously in a production environment this is intolerable as my customers cant be losing all their data everytime they upgrade !! so whats the workaround please and have i missed or done something wrong?. im frustrated that all my web searches yield virtually no solutions. i havent uploaded to google play store yet but know that on the emulator it only loses the data if you 'wipe' it and factory reset, and when i publish to test via vs2017 it keeps it fine.

    thanks in advance.
    Bob

  • TakeShikaTakeShika Member ✭✭

    Try disabling Automatic backup for the app (or disable Automatic Restore for your device).

    1. Disabling Automatic backup for the app
      Open the manifest file and add the "androi:allowBackup" part as following.

    1. Disable automatic restore on device
      May vary per device. Setting -> System -> Backup -> App data -> Automatic restore (disable this)
Sign In or Register to comment.