Page 1 of 1

Req variable click_state from widget

Posted: 01 Oct 2015 03:51
by natong
Since AM didn't have supplied variable when clicked from widget.
I would like to request supplied variable click_state from the widget.
Currently, I design using 2 flows for detect click_state.


Widget -> Action Execute Flow "Clicked ABC"

Flow "Clicked ABC" -> Action Script to set variable click_state = true; -> Action Execute Flow "ABC"
(I would like to request execuseFlow() and exitScript() functions too.)

Flow "ABC" -> ... Do the real tasks ...

Re: Req variable click_state from widget

Posted: 01 Oct 2015 11:56
by Martin
I don't fully understand what you mean by 'click_state'. Do you simply want to detect when the flow was executed using a clickable action from a widget?
In this case you could check if variable widget_name is not null, for example with a condition Expression: widget_name != null.

A clickable action in a widget will provide following variables to the executed action/flow:
widget_name, widget_cell_x, widget_cell_y, gesture (always CLICK for regular home screen widgets, LONG_CLICK, DOUBLE_CLICK and SWIPE_* for widgets displayed as overlays)

For widgets displayed as an overlay, also following variables will become available:
screen_x, screen_y

plus following ones when the gesture was one of the swipes:
swipe_velocity_x, swipe_velocity_y (pixels per second)

Regards,
Martin

Re: Req variable click_state from widget

Posted: 01 Oct 2015 13:26
by natong
Oh great! They are already there. That what I want. Thank for the info.