14 August, 2014

Android: How two app share data

Here we don't want to talk about ContentProvider and IPC and Intent:

If you want to share data between two applications, what I know is if two applications should use the same process, then they can share data.

How to make application use the same process please refer to:

android:sharedUserId and android:process.

(It's undocumented, but the shared user id need to be a string with at least one dot separator.)

Private Folder / SharedPreference.

SharedPreference and Private Folder are accessible by application context.
If you can obtain the correct context, then you can get data from another app.

External Folder:
This does not require using the same process.