Post your questions and help other users.
Moderator: Martin
-
Navier-Stokes
- Posts: 2
- Joined: 29 May 2015 08:17
Post
by Navier-Stokes » 29 May 2015 08:27
Hi,
I've composed a custom widget which simply displays a png-Image, that is downloaded by an extra 'getter-flow' and stored in the file system.
Once the image is updated on the file system the widget will not automatically reload the image.
So I extended the 'getter-flow' by a scrip action which executes the latest feature
Code: Select all
refreshWidget("theAppropriateWidgetName", true)
The action runs without errors if the first parameter is the string of the Widget name and the second parameter is a boolean. Therefore I expect the action to make my widget show the newly loaded image.
But it doesn't.
Can anyone give me some advice?
Kind regards
Markus
-
Martin
- Posts: 4468
- Joined: 09 Nov 2012 14:23
Post
by Martin » 30 May 2015 12:45
Hi Markus,
Function
refreshWidget with parameter
true was created exactly for this purpose and seems to work in my test cases.
Does the getter-flow itself call the refreshWidget or do you refresh the widget from a parent flow that does not wait for the getter-flow to finish? Maybe the refreshWidget-function is called before the image is actually downloaded and stored in the file system.
Could you post the flows or a description of the flows and a the debug log after the widget should have been refreshed?
-turn on
Debug log and
Log to SD card in the preferences of Automagic
-execute your flows so that the widget should refresh
-on the flow list: menu->Manage->Log, menu->Send Log (send to
info@autoamgic4android.com)
Thanks & Regards,
Martin
-
Navier-Stokes
- Posts: 2
- Joined: 29 May 2015 08:17
Post
by Navier-Stokes » 01 Jun 2015 14:06
Martin wrote:
[...]
Does the getter-flow itself call the refreshWidget or do you refresh the widget from a parent flow that does not wait for the getter-flow to finish? Maybe the refreshWidget-function is called before the image is actually downloaded and stored in the file system.
[...]
Hi Martin,
the getter-flow is invoked by a klick action. And I verified its capability.
The getter-flow also performs the
.
Manually running the getter-flow actually does refresh the widget. So I recognized the problem which was 'homemade'by myself:
The click action simply triggered the single action "download image" rather than the complete flow.
Now I fixed the problem.
I'm sorry for causing disconvenience.
Thanks for your reply!
Regards
Markus
-
Martin
- Posts: 4468
- Joined: 09 Nov 2012 14:23
Post
by Martin » 01 Jun 2015 18:40
No problem, I'm glad it works now
