views:

20

answers:

0

I spend most of my time in an environment where I can package code with dependencies that are resolved at install time automatically. That's nice. I can install any item and the library needed to support it is automatically added if it doesn't already exist.

In Android, this isn't yet possible, so I need another way to share some resource. (I can't depend on the Android Market, I think, and fire off some installer if some Intent doesn't resolve at run-time.)

The component I want to share is some password credential. I have several packages that will use the same credential, and I want any installation after the first package to use the credentials that the first already stored.

I think that the best way is to make every package I distribute to use the same "shared user id" and crypto package-signature, and implement something in each that accesses the same resource. Is that right?


Part two: I'm trying to share AccountManager data. I don't mind eschewing the correct AccountManager usage with getAccessToken and authenticators, and instead making each app write and read directly from the account manager with .addAccountExplicitly and .getUserData .

At present, one app, all on its own, crashes with "java.lang.SecurityException: caller uid 10031 is different than the authenticator's uid". This is confusing because there are no other apps installed that could refer to. What gives?