How to list my app downloads

前端 未结 3 1787
再見小時候
再見小時候 2021-01-28 16:51

I\'m working on books library in my android app... so I want to add a functionality that allows the user to view the books that he/she has downloaded by my app..

any ide

3条回答
  •  醉酒成梦
    2021-01-28 17:36

    The final solution depends a bit on the details you want to store for the books. If you only want to store the book title and author and you don't want to deal with a database yet then SharedPreferences might be an option. But they are more like Java Properties files and with this said not a good solution for persisting more complex data structures.

    If you want to store more metadata of the books (e.g. the current read position, bookmarks, etc.) then you will need a database sooner or later. I recommend thinking about the data model first and then start with the SQLite database included in Android.

    You can find more details here Android Developers - Data Storage

提交回复
热议问题