Reputation: 115
Can i share one application related data with another. Say I have a music file in resources/raw folder of apk2. Can I use the same file in apk1.
thx...
Upvotes: 2
Views: 6513
Reputation: 1022
To share the files between the apks, you need to pass the uri of the files along with the implementation of Content Provider. And while accessing it back, use the content resolver in the second apk.
You can see this in Gallery and Email app integration where an image gets attached to the email from Gallery.
Upvotes: 0
Reputation: 29745
If your apps are signed with the same certificate and have the same android:sharedUserId
declared in the manifest, they can share data in that they can read/write to each others' data directories. They can even share a process if you'd like them to (see android:process
).
Upvotes: 6
Reputation: 193696
The application which has the music file will need to implement a Content Provider. This will allow the other application to retrieve the content.
Upvotes: 0