What is a ContentProvider and what is it typically used for?

Technology CommunityCategory: AndroidWhat is a ContentProvider and what is it typically used for?
VietMX Staff asked 3 years ago

content provider manages access to a central repository of data. A provider is part of an Android application, which often provides its own UI for working with the data. However, content providers are primarily intended to be used by other applications, which access the provider using a provider client object.

Typically you work with content providers in one of two scenarios;

  • you may want to implement code to access an existing content provider in another application, or
  • you may want to create a new content provider in your application to share data with other applications.