As far as naming issues, this is why you should use an authority in a
namespace/domain you own, so that there will not be naming collisions.

For the possibility of your provider not being there, whether or not it was
ever there originally, any client app that is relying on a component that is
not part of the base platform needs to deal with the error cases if that
component does not exist.

On Thu, Jan 8, 2009 at 7:18 AM, whitemice <markbr...@zedray.co.uk> wrote:

>
> I've blogged this question with pictures here:
> http://tinyurl.com/9hwdva
>
> I am writing a component that makes certain functionality available to
> any application running on an Android device (e.g. an advertising
> service, stock ticker cache, Snowball server, etc).
>
> This functionality is useful for application developers, but not
> interesting to actual users i.e. my component should be included as
> part of a new application, but not require the end user to explicitly
> install the additional component themselves.
>
> I expect that over time multiple applications installed on the phone
> will want to communicate with my component.  As each new application
> will have a different certificate, I want to communicate between
> applications using an Android Content Provider.  To save resources on
> the device (networking, caching, etc) only one instance of my
> component should be appointed to handle all queries.
>
> This works well as Android only registers the first Content Provider
> for a given URI and then ignores the rest (throwing an "WARN/
> PackageManager: Skipping provider name xxxx name already used" error
> each time a new one is installed).
>
> However if the registered Content Provider is uninstalled, it will
> immediately break all the other applications that rely on it, even
> though other instances of the component still exist.
>
> Questions:
> - Does anyone have any suggestions on how to better handle this
> situation?
> - If I could reregister Content Providers I could handle situations
> like this, and upgrade components when newer versions are installed.
> Perhaps the Android OS could also handle this situation better, by
> tracking Content Provider naming collisions?
> - Should I be looking at other communication methods to solve this
> issue?
>
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to