0

I'm almost done the functionality portion of the app I'm making. It's a grade tracking service that has 3 data classes. They are Class, Type(which is like class breakdown), and assignments. Class has an arraylist of types, and type has an arraylist of assignments.

All of these classes implement parcelable, but I'm not sure that's going to help.

I need to be able to write all of the data contained inside of these objects (Eg. name, credits, percentages, grades, etc) to internal storage. What is the best way to go about this? I've tried looking on stackoverflow and could not find a clear cut answer to what I'm working with.

Kevin Cianfarini
  • 649
  • 1
  • 5
  • 11
  • You could serialize your data and [write it to a file](http://stackoverflow.com/questions/5017292/how-to-create-a-file-on-android-internal-storage). – azurefrog Jan 07 '16 at 19:26
  • There are also [lots of other options](http://developer.android.com/guide/topics/data/data-storage.html). – azurefrog Jan 07 '16 at 19:27
  • @azurefrog Is implementing parcelable serializing? I wasn't quite sure about that – Kevin Cianfarini Jan 07 '16 at 19:27
  • Why not just create local database and store it as rows? – Keith Jan 07 '16 at 19:32
  • They are [not the same thing](http://www.3pillarglobal.com/insights/parcelable-vs-java-serialization-in-android-app-development). Without more details about your use case it's hard to say what the best approach is. Are you just persisting state for when you aren't running? Do you want a queryable data store? etc. – azurefrog Jan 07 '16 at 19:41
  • @azurefrog As of right now I'm just persisting the data for when I am not running the application. – Kevin Cianfarini Jan 08 '16 at 01:22

0 Answers0