Page 1 of 1

Help optimize this lost phone flow?

Posted: 17 Aug 2014 17:35
by magik20
Sorry in trying to be as specific as possible.

When using the location-based feature if the phone doesn't find a location fast enough it will error.

I change this to tell the phone to find a new location however it takes a very long time to do this and doesn't move through the rest of the flow until completed.

Anything else that people see that could be optimized in this flow?

http://imgur.com/XVgNG9n

http://automagic4android.com/flow.php?i ... d06ad37b17

Re: Help optimize this lost phone flow?

Posted: 18 Aug 2014 17:19
by Martin
You could use an error handling connection to specifically handle the case when no location can be acquired within the timeout period. To do this you could set the timeout of the action Init Variable Location to 1 minute and create a connection from the location action to a the action you want to execute when the location-action fails. Now select the connection between the two actions, press the Edit-icon and set the type of the connection to 'Exception'. The flow will execute this connection only when an error occurs in the location-action. You could use this mechanism to write a text like 'No location found' into the mail.

You could also use an action Execute Flows to execute another flow that only tries to acquire a location for a few minutes and then sends another mail containing the location when the location becomes available.

From my own experience I would not add a loud alert sound into this flow since I tend to mistype the PIN in the cinema :)
You could also create a second flow that stops the first flow when the trigger Login Attempt: Successful after failed is executed.

Re: Help optimize this lost phone flow?

Posted: 18 Aug 2014 17:29
by magik20
Martin wrote:You could use an error handling connection to specifically handle the case when no location can be acquired within the timeout period. To do this you could set the timeout of the action Init Variable Location to 1 minute and create a connection from the location action to a the action you want to execute when the location-action fails. Now select the connection between the two actions, press the Edit-icon and set the type of the connection to 'Exception'. The flow will execute this connection only when an error occurs in the location-action. You could use this mechanism to write a text like 'No location found' into the mail.

You could also use an action Execute Flows to execute another flow that only tries to acquire a location for a few minutes and then sends another mail containing the location when the location becomes available.

From my own experience I would not add a loud alert sound into this flow since I tend to mistype the PIN in the cinema :)
You could also create a second flow that stops the first flow when the trigger Login Attempt: Successful after failed is executed.
Sorry Martian, I on barely understand how to do what your suggesting.... could you modify the flow and post it here?

Re: Help optimize this lost phone flow?

Posted: 18 Aug 2014 17:43
by Martin
Flow Intruder2 shows what I mean by an exception-connection:
Intruder2

I inserted the location-action after the images are taken since the location-action could take up to one minute to complete when no location becomes available immediately. The red dotted connection is only executed when no location becomes available within one minute. You could use this feature to compose another mail without location when this happens.

Re: Help optimize this lost phone flow?

Posted: 18 Aug 2014 18:05
by magik20
Thanks a ton! Seeing the exception makes a lot more sense now.

Any other tips for this flow? I've been scrounging around similar ones for ideas.

How do I stop errors from keeping the flow going? Do I need more then this one exception?

Re: Help optimize this lost phone flow?

Posted: 19 Aug 2014 08:59
by Martin
Errors usually stop the flow at the action/condition that caused the error. Automagic will also show a notification on the status bar when an error occurs, which might be undesirable for a thief detection flow.
The exception-handling connection is the mechanism you can use to continue the flow, Automagic will not show the error-notification when the error is handled with such a red dotted connection.

If you don't do this already, I would add another flow to request the location of the device with an SMS. The catalog contains an basic example called 'Lookup device location' (on the flowlist: menu->Catalog, select Location).