In 2.13.5-beta Image items with refresh interval set are not refreshing. The issue is not present in 2.13.0
Image items should refresh properly.
The issue has probably originated in #2039 but I'm not sure.
This seems not to 100% solved.
I have my webcams on sitemap with refresh interval of 1000ms and it works.
But I have also statistic images of my photovoltaic and there refresh interval is at 1 minute. If I open the app the statistic images show old values and old time. I have to wait 1 minute, and then it refreshes. Or I swipe down to force an update, then a new image is shown.
So I think images have to be refreshed every time the site/frame is opened again. In an older version this worked and in the Playstore main release it works too I think.
'Open' as in 'open from recents'? Or 'open with the app not running before'? It's supposed to reload in the former case; if that doesn't work I need to check it again.
Tested with release 2.13.9-beta from playstore.
Made a php script to generate an image with current time.
<?php
$text = date("H:i:s");
header('Content-type: image/png');
$im = imagecreate(100, 30);
$bg = imagecolorallocate($im, 255, 255, 255);
$textcolor = imagecolorallocate($im, 0, 0, 255);
imagestring($im, 5, 15, 7, $text, $textcolor);
imagepng($im);
imagedestroy($im);
?>
Included image like this in my sitemap with a refresh of 10 seconds
Text label="Test" {
Image url="http://127.0.0.1/bild.php" refresh=10000
}
all apps closed > start app > navigate to Test > old time / older than 10s FAIL
stay on Test > send app to background > wait more than 10s > go back to opened app > directly refreshed OK
display turns off due to inactivity with Test opened > wake up with fingerprint > directly refreshed OK
navigate from other frame to Test > old time FAIL
it refreshes only after 10 seconds (as defined in sitemap) or when directly bringing back app to front and Test was open before.
It does not refresh when navigating between frames in the app.
*with directly refreshed I mean: time is not next 10s intervall but directly refreshed to current time, that's ok.
Thanks, I'll check that.
@mueller-ma Please reopen.
OK, found the issue: the HTTP request is fired at the correct time by the image view, but the response is served from (OkHttp internal) cache. I'll think about a solution.
Issue again in 2.13.17-beta. Image not refreshing when navigateing to frame/page.
Was working in 2.13.16-beta.
I can not reproduce that (using the test case you posted above) on 2.13.18-beta. From the commit history, I don't see what could cause a regression there either.
After rotating the device images don't refresh anymore.
I rather see an issue that the image disappears completely after device rotation. Are you referring to that?
In any case, I'll have a look into that.
The images don't disappear on my device, they just stop refreshing.
It's weird, can not describe a testing scenario.
Will investigate it.
Sometimes it doesn't update and sometimes it does not load and display white area instead.