0

I have a version 1 of an app installed on the device. An app can be updated automatically to version 2.

I would like to save a constant string (defined at build time) in version 1 and read it in version 2. It might happen that app updates itself to version 2 before user runs version 1, so I cannot save my string programmatically.

Is there any way to declaratively define preference (or maybe have an asset file containing a value) which does not require a code to run and persist during update?

lstipakov
  • 3,138
  • 5
  • 31
  • 46

1 Answers1

0

you can use raw folder for that, you can store text files in this folder and then access them from your android applications .. but it is only for reading see this tutorial

http://thedevelopersinfo.com/2009/11/27/using-files-as-raw-resources-in-android/

Charaf Eddine Mechalikh
  • 1,248
  • 2
  • 10
  • 20