Skip to main content

Posts

Showing posts from July, 2013

Content Provider in Android (Part 1)

 Today, I will introduce about Content Provider in Android. What's is Content Provider? - Content Provider store and retrieve data. Content Provider will make data accessible to all applications. This is unique way to share data across applications. - Android provide a number of Content Provider for common data types (audio, video, images, bookmarks, contact,...). Query these providers for the data contained. (although, for some, must acquire the proper permission to read/write data). There're 2 ways to make data public: - Create your own Content Provider. - Add your data to existing Content Provider. Example 1: Displays Bookmark of System Browser. - Permission is required to access Browser Content. Declare 2 below lines in AndroidManifest.xml file: < uses-permission android:name = " com.android.browser.permission.READ_HISTORY_BOOKMARKS " > < uses-permission android:name = " com.android.broswer.permission.WRITE_HISTORY_BOOKMAR...