When to use a Content Provider

后端 未结 9 1478
没有蜡笔的小新
没有蜡笔的小新 2020-11-27 10:52

I understand that Content Providers are made to allow publicly sharing data between applications. However, I\'m wondering if anyone has thoughts about making a Content Provi

9条回答
  •  抹茶落季
    2020-11-27 11:31

    As said in documentation: Creating a Content provider

    You don't need a provider to use an SQLite database if the use is entirely within your own application.

    So why bother developing this overhead? You want easier and faster development, right? So one layer of abstraction (SQLiteOpenHelper descendent) is enough.

    See Occam's Razor Do not make an entities without very good reason.

提交回复
热议问题