0

Our data in our Android app has started to get more complex and is being updated. So, I need to persist relational data that I am pulling from our backend via REST json services. I'm thinking I should use a SQL lite data store on the android device rather than the serialized string data store we are currently using.

Is there something similar to CoreData and AFIncrementalStore from iOS in Android. I was looking at Green Dao with SQL-Lite but not sure if there is a better solution out there specialized for ORM from JSON REST services to SQL lite.

MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460

1 Answers1

0

Take a look at OrmLite. You can use it with RoboSpice for automagically retrieve data from your REST service and persist them inside local database.

rciovati
  • 27,603
  • 6
  • 82
  • 101
  • Is there a pre-set spice service for that or would I have to combine the JacksonSpringService with the Orm Service in some way. Not sure which doc/example to start with. – MonkeyBonkey May 15 '13 at 20:21
  • You can subclass the `JacksonSpringService` class, ovverride the `createCacheManager` method and add logic for OrmLite, as in this example: http://bit.ly/10Ryo2G – rciovati May 16 '13 at 08:54
  • i would not suggest this approach since Annotations have a significant cost on especially Gingerbread devices. I know greendao may take a while to get used to but once you learn it, it will provide you a cleaner code and performance – yigit May 16 '13 at 10:09