Android persistence alternative to SQLite

前端 未结 7 1593
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-19 20:52

Is there any other alternative to SQLite in Android for persisting data in the phone? I am looking something like iOS coredata or something simpler like a key-value store. If we

相关标签:
7条回答
  • 2021-02-19 21:11

    I don't know anything about iOS but take a look at SharedPreferences

    0 讨论(0)
  • 2021-02-19 21:14

    You could serialize to xml. Take a look at Simple http://simple.sourceforge.net/ it's less then 500kb in size.

    0 讨论(0)
  • 2021-02-19 21:14

    Exist a alternative call REALM is a complete library to manage the database like objects, similar to ActiveRecord (in Ruby on Rails). And one of his advantage is the speed in transactions. But be carefull because is a new library maybe is a good idea first read the all documentation.

    0 讨论(0)
  • 2021-02-19 21:20

    There are a few different methods for persisting data in Android. Read this Android article about it.

    0 讨论(0)
  • 2021-02-19 21:26

    If you need just a simple store for a couple key/value pairs, SharedPreferences is the way to go. If you are looking for something more powerful, that compares to Core Data, you should give greenDAO a try. Like Core Data, greenDAO a layer between your objects and the data store (Core Data on iOS usually takes SQLite, too).

    0 讨论(0)
  • 2021-02-19 21:29

    You could look at http://jdbm.sourceforge.net/: 78kb jar, transactions, will save to a file.

    0 讨论(0)
提交回复
热议问题