home-assistant / android

:iphone: Home Assistant Companion for Android
https://companion.home-assistant.io/
Apache License 2.0
2.33k stars 650 forks source link

SVG images don't display in picture widget #4469

Open natekspencer opened 4 months ago

natekspencer commented 4 months ago

Home Assistant Android app version(s): 2024.6.3-full

Android version(s): 14

Device model(s): Samsung Galaxy S24 Ultra

Home Assistant version: 2024.6.3

Last working Home Assistant release (if known): To my knowledge, this has always been an issue.

Description of problem, include YAML if issue is related to notifications: I have an image entity that produces an SVG image. When selecting that entity for the Picture widget, it just displays a blank widget.

Companion App Logs: homeassistant_companion_log_5-18-2024_9-9-52.txt

Screenshot or video of problem: Screenshot_20240618_085822_One UI Home

Additional information: The relevant image entity in the logs is image.thoth. I've included the full log file, but I'm guessing the relevant errors are:

06-18 09:01:20.031 17541 23207 W Kumiho-Kumiho: isSupportedFormat: Format is not supported
06-18 09:01:20.036 17541 23207 D OpenGLRenderer: --- Failed to create image decoder with message 'unimplemented'
dshokouhi commented 4 months ago

interesting the app was able to download the image and load it into the view

06-18 09:01:19.978 17541 17541 D CameraWidget: Fetching camera image
06-18 09:01:19.980 17541 17541 I AppWidgetManager: updateAppWidget() appWidgetIds = [36]
06-18 09:01:19.985 17541 17541 D InputTransport: Input channel destroyed: 'ClientS', fd=152
06-18 09:01:19.985 17541 17541 D CameraWidget: Fetch and load complete
06-18 09:01:19.987 17541 23207 D TrafficStats: tagSocket(148) with statsTag=0xffffffff, statsUid=-1
06-18 09:01:20.031 17541 23207 W Kumiho-Kumiho: isSupportedFormat: Format is not supported
06-18 09:01:20.036 17541 23207 D OpenGLRenderer: --- Failed to create image decoder with message 'unimplemented'

i am not sure if widgets naturally support SVG images

https://developer.android.com/media/platform/supported-formats#image-formats https://developer.android.com/develop/ui/views/graphics/drawables#drawables-from-images

jpelgrom commented 4 months ago

i am not sure if widgets naturally support SVG images

https://developer.android.com/media/platform/supported-formats#image-formats

That first link answers the question: Android does not natively support svg images. Unless we want to implement our own image decoders everywhere I'd say this is out of scope for the app - this issue will also apply to notifications.

natekspencer commented 4 months ago

Thanks, appreciate you looking into this!