Still using and tweaking my flows Long live AM!
I have an icon that appears in a notification (Spotify album cover) and I want it to display in a widget. It doesn't seem I can pass it into a widget as a global variable as global variables can't contain images, right?
So is my only option to write the image to a file, and refer to the file in the widget? In an ideal world I'd rather keep it all in memory and not keep writing and overwriting the file - is this possible (to avoid file writing by keeping it in memory)?
How to get an image into a widget
Moderator: Martin
- digitalstone
- Posts: 342
- Joined: 21 Oct 2017 12:36
- Location: The Netherlands
Re: How to get an image into a widget
I have a weather widget, in where i'm using an icon.
That icon is one of many inside a folder on my phone.
I simply tell with the setWidgetElementProperty function what the filepath of that icon should be.
refreshWidget if necessary.
That icon is one of many inside a folder on my phone.
I simply tell with the setWidgetElementProperty function what the filepath of that icon should be.
refreshWidget if necessary.
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)