0

I am developing an android application and my app contains a few ArrayLists which have some predefined elements when the app is first installed.Now my question is, is it possible to save any changes made to those ArrayLists during runtime(adding/removing elements) to the project's source code when the app closes? I want to use this method (if it's plausible) for developing purposes only so don't worry about how other users will behave. Any help is welcome!

Stelios Papamichail
  • 955
  • 2
  • 19
  • 57
  • I believe something like [this](https://github.com/linkedin/dexmaker) should help you. – Sakchham Jan 19 '18 at 19:09
  • 1
    what about sharedpreferences? – Gastón Saillén Jan 19 '18 at 19:29
  • use `sharedpreferences` https://stackoverflow.com/questions/3624280/how-to-use-sharedpreferences-in-android-to-store-fetch-and-edit-values – Majid Mohammadi Jan 19 '18 at 20:08
  • @MajidMohammadi , i checked the post and some other similar ones but here's my question: If i use sharedpreferences to add/remove elements from those lists and then write them again using sharedprefs, doesn't that only affect the phone on which the app is currently running on? I mean, it won't add those String,Integers etc. to those ArrayLists so that the changes are present on every application instance right? Please correct me if i'm wrong :D – Stelios Papamichail Jan 20 '18 at 15:11

0 Answers0