clock widget

Post your questions and help other users.

Moderator: Martin

Post Reply
Ankit
Posts: 143
Joined: 11 Nov 2013 17:27

clock widget

Post by Ankit » 22 Feb 2014 03:10

Hi,
I have made a simple clock widget that refreshes every 10 second. But it consumes very much ram.

I want that it should update only when i am on home screen ..

Please help !!

Thanx in advance.....

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: clock widget

Post by Martin » 22 Feb 2014 15:02

Hi,

Updating a widget every 10 seconds probably consumes a lot of resources so I would reduce the update frequency if possible.

You could disable Automatically refresh in the settings of the widget and use a global variable to show the time in a text field with {global_time,dateformat,HH:mm:ss}. You can assign the current time to the global variable from a flow to update the widget. An action Script like this should work in a flow:
global_time=getDate();

You can use all triggers and conditions available to flows to decide if your widget should be updated or not. You could also disable the flow when an app is started and enable the flow again when the home screen is shown.

Regards,
Martin

Post Reply