views:

53

answers:

2

I am using android build target vendor version 2.2.

I want to access/read sqlite3 database file of an application A from an application B. Is it possible to do so? because i don't want to import that DB file of apps A in Apps B.

+1  A: 

Short answer is no, not directly, although it is possible to expose the data from application A via a ContentProvider and consume it from application B in a similar fashion.

See here for more on ContentProviders.

Quintin Robinson
A: 

Actually, assuming that apps A and B are both yours, it might well be possible using the sharedUserId (and possibly sharedUserLabel) attributes in your AndroidManifest.xml - if both apps are running under the same UID, you should be able to read app A's files from app B. I've never done it myself, but here and here look like places to learn the ins and outs of that method.

vmlinuz