cbitstech / Purple-Robot

Sensing and automation platform for Android.
Other
38 stars 19 forks source link

Purple Notifier widget: empty action, tap fires past and previously unfired trigger anyway #217

Closed estory1 closed 10 years ago

estory1 commented 10 years ago

Repeated & observed twice in the last few minutes.

Repro: 0) Prereqs: PR 1.4.32 PN 1.1.13 PRNM script in which the setWidget function assigns '' as the widget's 'action' value (check w/ me).

1) Run the Purple Robot Notification Manager script in PR.

2) Review the set of EMA triggers. Ensure at least one occurring at a past time is listed; if not, re-run PRNM (each EMA is scheduled randomly within defined a window).

Let n = count(past EMA triggers).

3) For (i=0 to i < (n+1); i++), tap the widget.

You should see an EMA prompt display on all but the last tap.

Is there something in PR that runs prior triggers on widget tap?

estory1 commented 10 years ago

Observed twice also for Medprompt triggers. Repro:

0 & 1) Same as above, except ensure that a Medprompt is scheduled for the future. (Typically, current time + 2min is enough to do the refresh + run PRNM.)

2) Wait for the next MP to display... then MP displays. Do not actively respond to it (by hitting Yes or No) - instead, ignore it by hitting the Home or Back buttons.

3) Tap on the widget. The same Medprompt as in step 2 displays, a second time.

Tapping it a second time displays the Medprompt a third time.

But, note that tapping it a third time does not display the Medprompt a fourth time.

estory1 commented 10 years ago

Also - this version of PRNM is the version producing the above: https://github.com/nupmmarkbegale/purple_robot_notification_manager/tree/692b059f1024114f25c5a2e2acdddd27993603f3

audaciouscode commented 10 years ago

Fixed in 1.5.0.