To copy and paste complex data or files from your application to other.To expose your application data to widgets.To implement custom search suggestions in your application.In addition, you need your own content provider in the following cases: When working with the sync adapter framework you can also createĪ stub content provider as an alternative. If you use any of these classes, you need to implement a content provider Illustration of migrating content provider storage.Ī number of other classes rely on the ContentProvider class: For example, you might swap out a SQLite database for alternative storage, asįigure 2. In this scenario, only your content provider is affected and not the applications thatĪccess it. Implementation without affecting other applications that rely on access to your data. That lets you make modifications to your application data storage You don't have to use them, but you might choose to because they provide an abstraction Use content providers if you plan to share data. Overview diagram of how content providers Most importantly, you can configure aĬontent provider to let other applications securely access and modify your app data,įigure 1. Implementing a content provider has many advantages. Interface that connects data in one process with code running in another process. They encapsulate theĭata and provide mechanisms for defining data security. Stored by other apps and provide a way to share data with other apps. Content providers can help an application manage access to data stored by itself or
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |