Hi Pent.
I've just hit an issue with AutoWear that may be an issue with the synchronous protocol, but correct me if I'm wrong. It seems that when there's concurrency, only 1 synchronous action will proceed. This is the use case I have:
- 2 profiles that trigger at the same time:
Profile: Synchronous Test 1 (457)
State: AutoWear State [ Configuration:Connected: true ]
Enter: Connected Confirm (458)
A1: AutoWear Confirm Screen [ Configuration: Timeout (Seconds):20 ]
A2: Flash [ Text:Confirm %awmessage Long:Off ]
Profile: Synchronous Test 2 (624)
State: AutoWear State [ Configuration:Connected: true ]
Enter: Connected Battery (625)
A1: Wait [ MS:0 Seconds:3 Minutes:0 Hours:0 Days:0 ]
A2: AutoWear App [ Configuration: Timeout (Seconds):60 ]
A3: Flash [ Text:Battery %awmessage Long:Off ]
- In Profile 1, screen comes up and waits 5 seconds for user interaction. Task is synchronously waiting in A1 for 5 seconds
- In profile 2, it waits 3 seconds then executes a command that proceeds right away
This is what happens:
- 2 profiles trigger
- Profile 1 A1 waits
- Profile 2 A2 synchrounsly runs after 3 second wait
- Profile 1 A1 never proceeds and times out: this is the issue
I've added the line
Log.v(TAG, "Signaling Finish: " + completionIntent.toUri(Intent.URI_INTENT_SCHEME));
in TaskerPlugin.java right after
completionIntent.putExtra(EXTRA_VARIABLES_BUNDLE, vars);
and this is what appeared:
03-17 11:00:10.550 17254-17882/com.joaomgcd.autowear V/TaskerPlugin﹕ Signaling Finish: intent:2#Intent;scheme=actionid;action=net.dinglisch.android.tasker.ACTION_PLUGIN_FINISHED;component=net.dinglisch.android.taskerm/.ReceiverStaticAlwaysOn;i.net.dinglisch.android.tasker.extras.RESULT_CODE=-1;end
03-17 11:00:10.677 17254-17847/com.joaomgcd.autowear V/TaskerPlugin﹕ Signaling Finish: intent:2#Intent;scheme=actionid;action=net.dinglisch.android.tasker.ACTION_PLUGIN_FINISHED;component=net.dinglisch.android.taskerm/.ReceiverStaticAlwaysOn;i.net.dinglisch.android.tasker.extras.RESULT_CODE=-1;end
It seems that there is no distinction between the 2 "signalFinish" so Tasker just runs the latest one?
Hope this makes sense to you :)
Thanks as always
João