Reputation: 95
I`m using monodroid and work with database via sqlite-net library. In one application transaction all data correctly putting and getting from database, but when I deploy application next time my database file doesn't exists.
I`m using methods some like these
But Im testing same code in MonoTouch and WP7 application and it
s allright.
So question is: why does database always lost?
Upvotes: 1
Views: 194
Reputation: 551
To preserve data and cache data between application installs:
In Visual Studio:
Click Tools > Options...
In the left-hand tree, select Xamarin > Android Settings
In the right-hand panel, select [X] Preserve application data/cache on device between deploys.
In Xamarin Studio:
Click Tools > Options (Windows) or Xamarin Studio > Preferences (OS X)
In the left-hand tree, select Projects > Android
In the right-hand panel, select [X] Preserve data/cache between application deploys.
Based on the post on Xamarin Forum
Upvotes: 6