What is the difference between Content provider and SQLite database? which one to use?
i. Use content provider if you want to share the db created by one activity of application to other activity of the same application.
ii. Use database if we want to store DB private to application, and for storing structured heavy data.
iii. Use content provider if you want to share the data created by one application to other application.
i & ii
ii & iii
DB is used to create tables private to application. You can access SQLite Database with in the application directly. Other applications can't directly touch the SQLite Database of a given application.If you want to share your database with other applications then use Content provider.
Content provider is used to share the data with other applications.
Back To Top