开发者

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,

Jonas


Went with ContentResolver.openAssetFileDescriptor() on the service in the end. Should be possible to send an AssetFileDescriptor over IPC but didn't manage to.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜