Say I have my midi implementation in a dynamic feature module and want to keep its setup well contained in that module, while one can specify the MidiDeviceService in the feature module's AndroidManifest (which gets merged via manifest merging to the main app one), any reference to an xml resource containing the meta-data devices list fails. I've found that I must provide that in the top-level app module, so its like the feature module's AndroidManifest has to reference the top-level module's resources only for this meta-data information = unfortunate.
And since we are unable to simply include the metadata recourse contents within the meta-data tag (else "AAPT: error: unexpected element <devices> found in <manifest><application><service><meta-data>."), it seems this resource linking does not support feature modules.
Any ideas as to how I could achieve my goal?