Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing string resources inside network-security-config #106

Open
numandev1 opened this issue Jun 13, 2023 · 0 comments
Open

Accessing string resources inside network-security-config #106

numandev1 opened this issue Jun 13, 2023 · 0 comments

Comments

@numandev1
Copy link

Is it possible to use string resources inside android:networkSecurityConfig defined in AndroidManifest.xml?

I have a config file like this:

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
  <domain-config>
    <domain includeSubdomains="true">mydomain.com</domain>
    <pin-set>
      <pin digest="SHA-256">@string/pin</pin>
      <pin digest="SHA-256">@string/pin_fallback</pin>
    </pin-set>
    <trustkit-config enforcePinning="true" disableDefaultReportUri="true">
    </trustkit-config>
  </domain-config>
</network-security-config>

but my app doesn't seem to detect resources I define in res/values/strings.xml. Hardcoding these strings works just fine though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant