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:
 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 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.

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?


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Getting platform files from command line

Hi Everyone,
    I apologize if I'm in the wrong place, and I apologize if you've already
seen this message, but to the best of my knowledge this message never made
it through (since I was a brand new user at the time) I can't figure out how
to get the platform files for development, without running 'android' and
starting the GUI. I want to avoid running GUI applications on my dev server,
since it's headless and I don't want to forward X particularly. I can't
imagine that it does anything more than figure out your platform, pull down
a tarball and unpack it, surely this doesn't necessitate a gui, does anyone
know how I can get the platform files without it?

Cheers,
Dan

-- 

2. android Java code for form action

Hi ,

I did log in form in android ,

How to add the event functionality for this login form,

Now login form display,

I want to add the java code ,

That is When user enter his username and password ,

Get the value into variable and page redirect and system should show ,
you have enter this username and password ..chk the scrren shot..

http://i.imgur.com/Ncnee.gif

-- 

3. Problem with the picasa api

4. AppWidget design pattern with SQLite database

5. Question about NDK

6. How to watermark the camera picture?

7. Chilling news: Oracle sues Google over Android