EAP version 1.29.0-dev
Moderator: Martin
Re: EAP version 1.29.0-dev
Just wanted to let you know that everything looks good . I've been using it for a couple of days and haven't encountered anything unusual.
Re: EAP version 1.29.0-dev
Good to know that it works now. I hope CM does not change the profile-features in the near future
Re: EAP version 1.29.0-dev
This version is considered feature complete. I will concentrate on testing and bug fixing in the next time.
Changes in this update:
Changes in this update:
- new trigger Send/Share Multiple Intent Received
- new action Remove WiFi Access Point
- added more inbox types to trigger/condition Gmail Unread Conversation Count
- added helper to test regular expressions in action Script
- fixed actions Set GPS State and Set Network Location State on Android 6
- minor changes and fixes
Re: EAP version 1.29.0-dev
Now, we can exit the script block and continue on the next block ? and/or exit flow by a script command?Martin wrote:
- added support for break, continue and return in scripts
Re: EAP version 1.29.0-dev
The new statements only have effect within an action Script, but don't allow to stop a entire flow immediately. You could use a condition Expression and end the flow on true/false when the rest of the flow should not be executed.
break: is used to stop evaluating expressions in the loop body and continue the script with the first expression after the loop
continue: is used to stop evaluating expressions within the loop body and to continue with the next iteration of the loop
return: ends the current script and returns the specified value
Regards,
Marti
break: is used to stop evaluating expressions in the loop body and continue the script with the first expression after the loop
continue: is used to stop evaluating expressions within the loop body and to continue with the next iteration of the loop
return: ends the current script and returns the specified value
Regards,
Marti
Re: EAP version 1.29.0-dev
A new EAP build is available.
Changes in this update:
Changes in this update:
- minor changes and fixes
Re: EAP version 1.29.0-dev
Hi Martin,
I'm trying to show a notification on my Moto 360 (with Notification on Statusbar) but it will not display on the watch if either "Ongoing" or "Keep on clear" setting is selected. I need this because I'm making a School profile for my phone that I want to be able to enable and disable from my watch.
I'm trying to show a notification on my Moto 360 (with Notification on Statusbar) but it will not display on the watch if either "Ongoing" or "Keep on clear" setting is selected. I need this because I'm making a School profile for my phone that I want to be able to enable and disable from my watch.
Re: EAP version 1.29.0-dev
This is a limitation of Android Wear, which will not show ongoing notifications posted on the phone. You either have to disable the "Ongoing" and "Keep on clear" flags or alternatively use a custom widget and show the widget on the wear device with Show Custom Widget Overlay (Android Wear). I think I could add a feature to post notifications directly on Android Wear which would probably also work for ongoing notifications. I'll add it to the todo-list.
Regards,
Martin
Regards,
Martin
Re: EAP version 1.29.0-dev
Hi Martin,
I wonder how I should use "return" in a script.
"return" is normally used to return a value form within functions.
Since (as far as I know) functions cannot be defined in an automagic script, I can only assume that "return" should be used at script level.
But how can a subsequent flow action access the value returned from the script then?
Tx in advance for your reply,
Peter.
I wonder how I should use "return" in a script.
"return" is normally used to return a value form within functions.
Since (as far as I know) functions cannot be defined in an automagic script, I can only assume that "return" should be used at script level.
But how can a subsequent flow action access the value returned from the script then?
Tx in advance for your reply,
Peter.
Martin wrote:The new statements only have effect within an action Script, but don't allow to stop a entire flow immediately. You could use a condition Expression and end the flow on true/false when the rest of the flow should not be executed.
break: is used to stop evaluating expressions in the loop body and continue the script with the first expression after the loop
continue: is used to stop evaluating expressions within the loop body and to continue with the next iteration of the loop
return: ends the current script and returns the specified value
Regards,
Marti
Re: EAP version 1.29.0-dev
You can use return to terminate a script early, without returning a value, but you could also use it in a condition Expression to return a boolean value, for example to return false when some preconditions are not met.
You could also use it to create something like functions with eval, admittedly quite a hack:
Regards,
Martin
Code: Select all
if (var==null) {
return false;
}
return var>5;
Code: Select all
xyz = eval("if (var==null) return false; return var>5;");
Martin