0

据我了解,扩展ContentProvider有助于与存储在设备中的本地数据库进行交互。但我不确定如何ContentProvider使用在线数据库来实现。ContentProvider仅适用于本地数据库吗?我正在考虑将两者与缓存一起使用,但我在这方面非常缺乏经验。任何建议将不胜感激。

4

1 回答 1

1

The Contentprovider interface design actually abstracts the actual persistence details away from your data access, in theory making any kind of data source possible. In practice, the performance of a contentprovider accessing it's data over the network will be poor at best due to the overhead compared to a local datasource such as SQLite / files.

Preloading/cacheing is probably a good idea!

于 2013-01-18T15:28:36.100 回答