On Fri, Jul 24, 2009 at 11:46 PM, loctarar <[email protected]> wrote:

> 1. The ContentProvider class is registered in the kernel when the
> application is installed and then what? Or how do the other
> applications exactly manage to access the application data?


The kernel is not involved at all.  It is declared in the application's
manifest, so the package manager knows about it and the system uses a query
on the package manager to find the provider for a particular content
authority.


> 2. When is actually onCreate called? The documentation is pretty
> vague...


Each time the process that hosts that content provider is started up.\


> 3. What happens if two applications register the same provider class?
> (I have more applications that must communicate between eachother.
> The
> content provider must be registered, of course, along with the first
> application installed on the system. The problem here is that I don't
> know which one will be, so I want to deliver the ContentProvider with
> all the applications)


The class is irrelevant.  The authority is the identity of the provider, and
the system doesn't allow you to install an .apk containing a provider for an
authority that is already defined in another installed .apk.

-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~
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