Widget update rate slow?
Posted: 16 Dec 2017 00:33
Hi,
I'm currently rebuilding a Tasker task with Automagic. All gets triggered by the app "Motion Detector" (Beta version is far more recent) which sends an intent. The triggered flow sets a variable to getElapsedRealtimeMillis() plus 90 seconds. Another flow gets triggered when the variable is changed. That flow shows a widget overlay with a green bar spanning the whole display width which length property gets modified ... so basically the green bar shrinks until the 90 seconds are over. This is done via a loop that modifies the width property and a sleep of 333ms. (And emergency stop after 3000 operations per minute which shouldn't be reached.)
My problem is: The overlay widget is not refreshing properly UNLESS I'm in the flow. While in the flow view/editor, everything works fine, the widget gets refreshed properly. But as soon as I leave the flow editor and get back to the flow list or my home screen, the widget only seems to get refreshed every 10-20 seconds or even less often. Why is that?
This is on an ASUS Nexus 7 with Android 5.1.1.
I'm currently rebuilding a Tasker task with Automagic. All gets triggered by the app "Motion Detector" (Beta version is far more recent) which sends an intent. The triggered flow sets a variable to getElapsedRealtimeMillis() plus 90 seconds. Another flow gets triggered when the variable is changed. That flow shows a widget overlay with a green bar spanning the whole display width which length property gets modified ... so basically the green bar shrinks until the 90 seconds are over. This is done via a loop that modifies the width property and a sleep of 333ms. (And emergency stop after 3000 operations per minute which shouldn't be reached.)
My problem is: The overlay widget is not refreshing properly UNLESS I'm in the flow. While in the flow view/editor, everything works fine, the widget gets refreshed properly. But as soon as I leave the flow editor and get back to the flow list or my home screen, the widget only seems to get refreshed every 10-20 seconds or even less often. Why is that?
This is on an ASUS Nexus 7 with Android 5.1.1.