Android Bug/Architectural Issue: How do I handle multiple versions of my own Content Provider?

by whitemice » Thu, 08 Jan 2009 23:18:16 GMT

Sponsored Links
 Ie blogged this question with pictures here: 

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 ARN/
PackageManager: Skipping provider name xxxx name already usederror
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.

- Does anyone have any suggestions on how to better handle this
- 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


Other Threads

1. Problem with giving the SDK path in eclipse for SDK 1.5 pre in windows

When I do a click on update on my previous version of ADT,I get a message
that there are no updates


2. Hi all,

i had a process running on background that save incoming  data in my
sdcard,Does anyone know how can i be notify , Plz help me? !!!

Thx for any little help!!!


3. " Develper Site Busy ????? "

4. Which process is responsible for injecting KeyEvents to the system ?

5. support wideband audio or ultra wideband audio

6. Android 1.5 on ADP radio problems related to locking SIM?

7. Run a Servlet web application on android i-jetty server.