Skip to main content

Posts

Showing posts with the label Content Providers

Content Providers in Android - ABNHive

Content providers - The name indicates all.  It provides contents or data to applications. In Android, Content Providers are used to sharing data between the applications.  The android.content Package The android.content package contains classes for accessing and publishing data. The Android framework enforces a robust and secure data sharing model. Applications are not allowed direct access to other application’s internal data. Two classes in the package help enforce this requirement: the ContentResolver and the ContentProvider. Functions in a Content Provider How to ensure smooth database functionality? Make a Content Provider:- This will be a full Content Management System with methods to add, update, delete new data. It will establish a unique address (URI) for the databases in your application. Use a Content Resolver:- Given the address (URI) it will resolve the particular address and ask the associated database living there. (Content Provider). A...