我需要学习如何在我的应用程序中使用数据库,因此我决定使用 vogella's tutorial因为他的大多数其他教程都非常有帮助。我只有几个问题来确保我的应用程序跨设备兼容。
他提到他的教程将使用异步加载器类
This tutorial describes how to use the SQLite database in Android applications. It also demonstrates how to use existing ContentProvider and how to define new ones. It also demonstrates the usage of the Loader framework which allows to load data asynchronously.
http://developer.android.com/reference/android/content/AsyncTaskLoader.html显示最低 API 级别为 11?
我应该如何学习 Android 中的 SQLite?我应该使用本教程吗?我想确保我使用的是最好的标准,同时尽可能地获得兼容性(至少 API 级别 7)
最佳答案
异步调用 SQLite 通常是最佳实践。您可以使用具有 AsyncTaskLoader
的 Android 支持库,但我通常只是扩展 AsyncTask ,这是在 API 级别 3 中引入的。
关于java - Android SQLite 简介,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12013844/