While testing different SVG viewers, I found one that loads external resources such as CSS from a remote URL. It worked correctly on an Android 14 device running in Genymotion. However, when I tested it on a physical Android 16 device, the external CSS and other components were not loaded. I also checked my web server logs and confirmed that no HTTP requests were received from the real device.

Below is my SVG content i used.

<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/css" href="https://sssss.requestcatcher.com/style.css"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" height="400" viewBox="0 0 500 400"> <!-- Background --> <rect width="100%" height="100%" fill="#f0f0f0"/> <!-- External CSS via @import + external font --> <style> @import url("https://sssss.requestcatcher.com/import.css"); @font-face { font-family: "ExtFont"; src: url("https://sssss.requestcatcher.com/font.woff"); } text { font-family: ExtFont, sans-serif; fill: #333; } </style> <!-- Title --> <text x="20" y="30" font-size="18"> External Resource Test </text> <!-- 1. External image --> <image href="https://sssss.requestcatcher.com/image.png" x="20" y="50" width="120" height="90"/> <!-- 2. External SVG symbol reference --> <use href="https://sssss.requestcatcher.com/icons.svg" x="160" y="50" width="100" height="100"/> <!-- 3. External image via filter (feImage) --> <defs> <filter id="imgFilter"> <feImage href="https://sssss.requestcatcher.com/filter.png"/> </filter> </defs> <rect x="280" y="50" width="120" height="90" filter="url(#imgFilter)"/> <!-- 4. foreignObject loading external HTML/image --> <foreignObject x="20" y="160" width="200" height="120"> <body xmlns="http://www.w3.org/1999/xhtml"> <img src="https://sssss.requestcatcher.com/html-image.png" width="180"/> </body> </foreignObject> <!-- 5. External script reference (often blocked in modern browsers) --> <script xlink:href="https://sssss.requestcatcher.com/script.js"/> <!-- 6. External link --> <a href="https://sssss.requestcatcher.com/"> <text x="20" y="320" font-size="16"> Visit external link </text> </a> </svg>

I tested the same SVG file in the same application on two environments. In Genymotion (Android 14), it worked correctly. However, on a physical Android 16 device, it did not load the external resources.

I can provide the logcat output if needed. Do you have any idea why the same app and the same SVG file would behave differently on an emulator versus a real device?

Cyb3rCr0wCC's user avatar

New contributor

Cyb3rCr0wCC is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.