Sharing sound resource with service
I have some activities and one service. I want to share a sound resource file (in the activities' res/raw folder primarily, but possibly in assets/) with the service. The activities and the service are in different APKs, signed with different keys.
One way is to read the file into memory,开发者_StackOverflow中文版 but I'd like to avoid that.
Is there perhaps an option of sharing "file handles" with a service?
Any pointers for how to achieve this?
Thanks in advance,
JonasWent with ContentResolver.openAssetFileDescriptor()
on the service in the end. Should be possible to send an AssetFileDescriptor
over IPC but didn't manage to.
精彩评论