On Aug 9, 3:36 pm, Sohan badaya <[email protected]> wrote:
> Hi All,
>
> I have a doubt about content provider. Why we use content provider?
> can't we use database of a application?
You do not have access to other databases (and there is not valid
reason to allow you to do so)


> If we talk about other application also. can't we use database of that
> application directly wihout
> content provider?
>
You don't want other applications to view/edit your entire database.
Other application developers don't want to know about the relations
between several tables.
And, if they don't know the logic and messes up with some keys, your
data will become unusable.
Not all databases are simple, sometimes, information about a single
entity can be distributed among several tables.
And, for inserting, there may be some pre-processing before inserting,
the ContentProvider will do that for you.


> Thanks,
> Sohan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to