Hi,
After last update camera images (timed images?) are not refreshing any more.
F.eks i have image with 2s refresh and when i open the app it works fine. Then phone goes to sleep and after unlock image stops refreshing.
Using it mostly to check if toddler is sleeping.
Phone is samsung note 8, Android 8.0
I guess you have version 2.3.0?
yes, last stable app from playstore 2.3.0, latest stable OpenHab 2.3.0 with all latest stable plugins (although camera image is only defined as plain image in sitemap with 2s refresh).
Previous app version worked fine with openhab 2.3 some time, after upgrade this started happening.
Thanks for looking into it!
I'll look into this. For now the distribution of 2.3.0 is paused, so the number of users with the broken version doesn't increase.
OTOH I'd say we need to switch last refresh timestamp in WidgetImageView from SystemClock.uptimeMillis() to SystemClock.elapsedRealtime(), as the former, which is what we're currently using, doesn't count time the device spent in deep sleep. Can't test myself at the moment though.
I couldn't reproduce this bug. @dakipro can you try to pull down the view to refresh it manually? Does this re-activate auto refresh?
Yes it does. After waking and unlocking the phone (also if i switch to another app and come back) the camera image is frozen. Pull down for manual refresh starts it working again
I've made the change that @maniac103 suggested. @dakipro can you try the apk: mobile-full-stable-debug.zip?
Code: https://github.com/mueller-ma/openhab.android/tree/uptime
I could not update existing app so I uninstalled previous and installed this version you attached, but now it is sort of not working at all. When I load dashboard, image refreshes once (i see the time on camera change one second) but then it freezes and doesn't refresh anymore at all. On manual refresh it is the same, I get a new image and one refresh after that, and then it stops again.
I see, my patch isn't complete. Can you try: mobile-full-stable-debug.zip
@dakipro does the apk work for you?
So sorry, I didn't see in auto email from github that you attached new version, I was waiting for new version (probably edit of comment was not sent by email).
It is a bit better now, but it is back to previous state where image is not refreshed after standby.
Image now runs when I look at the app, but I turn off the screen, turn it on again, and image is stationary.