In my application I set a network security configuration file with the following:
<network-security-config>
<debug-overrides>
<trust-anchors>
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
I'm setting in my manifest this way:
<application
(...)
android:networkSecurityConfig="@xml/network_security_config">
Additionally, I'm adding a 3rd party lib which supplies its own network security config file with a set of domains
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">domainA</domain>
</domain-config>
</network-security-config>
Which they are setting in my manifest this way:
<application android:networkSecurityConfig="@xml/network_security_config">
The problem is that the manifest merge only works in manifest.xml file (afaik), therefore the netowrk-security-config file will always be the application file and not the merge between the app and 3rd party network-security-config files, is there a way to achieve something like this?
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">domainA</domain>
</domain-config>
<debug-overrides>
<trust-anchors>
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>