I would customize the OSGI-INF metatype (xml) in order to add attributes dynamically.
This is an example of a metatype input:
<AD id="Device-Operation"
name="Device-Operation"
type="String"
cardinality="0"
required="false"
default="NONE"
description="Operations">
<Option label="None" value="NONE"/>
<Option label="Test" value="Test"/>
<Option label="OtherTest" value="OtherTest"/>
</AD>
I need to build these select options dynamically.
Have I to create a service?
And how can I update these properties from the bundle?
Thank you very much in advance.
You can register a MetatypeProvider OSGi service programmatically instead of declaring the metatype information in an XML file. By doing that, you can change re-register the service with new return values later.