Page 1 of 1

Google Maps and brightness

Posted: 14 Jul 2016 19:32
by akapelis
I often use Google Maps, and I wrote a flow to save energy. The flow maintains the low screen brightness during navigation, while increases brightness when the app "speaks" during turns. Sometimes Unfortunately the flow goes to emergency stop, i can't understand why...
Lot of thanks for any suggestion.

http://automagic4android.com/flow.php?i ... 3420466d51

Re: Google Maps and brightness

Posted: 20 Aug 2016 22:48
by valzi
I wish I knew why that happened! I'm downloading it to try it out. Thanks!

Re: Google Maps and brightness

Posted: 21 Aug 2016 07:57
by MURTUMA
akapelis wrote:Sometimes Unfortunately the flow goes to emergency stop, i can't understand why...
That is because there are too many elements firing up too quickly in succession. You could increase the 4 sec sleep, but that could make the flow unusable as it could miss spoken directions. Other way would be increasing the flow specific emergency count: go to editor view -> menu -> options -> set automatic emergency stop to specific and increase the number that appears there.

Re: Google Maps and brightness

Posted: 21 Aug 2016 12:46
by akapelis
Thank you very much Murtuma, by increasing the number of cycles everything is ok. Anyway i don't understand....there is only one trigger (app.task.running= Google maps) activated max every 4 seconds so the max number of cycles would be 15 (4x15=60 sec). Maybe i miss something?
Thanks again and sorry for my English.

Re: Google Maps and brightness

Posted: 21 Aug 2016 14:09
by MURTUMA
It doesn't count how many times the loop cycles or the flow runs. It counts executions of each individual element. So after the first loop completes(before it comes back to the condition App Task Running) the count will be 6. If the loop goes through the 4s sleep path instead of the 30s sleep path, the critical execution count fills up quite fast.

Re: Google Maps and brightness

Posted: 21 Aug 2016 15:27
by akapelis
Everything clear, thanks so much.