如何列出我的应用下载 [英] How to list my app downloads

查看:37
本文介绍了如何列出我的应用下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在我的 android 应用程序中处理图书库...所以我想添加一个功能,允许用户查看他/她已通过我的应用程序下载的图书..

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 idea or hint to work this out?

推荐答案

最终的解决方案在一定程度上取决于您要为图书存储的详细信息.如果您只想存储书名和作者,并且不想处理数据库,那么 SharedPreferences 可能是一个选择.但它们更像是 Java 属性文件,因此对于持久化更复杂的数据结构来说,这不是一个好的解决方案.

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.

如果您想存储更多书籍的元数据(例如当前阅读位置、书签等),那么您迟早会需要一个数据库.我建议先考虑数据模型,然后从 Android 中包含的 SQLite 数据库开始.

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.

您可以在此处找到更多详细信息Android 开发人员 - 数据存储

You can find more details here Android Developers - Data Storage

这篇关于如何列出我的应用下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆