Page 1 of 1

Choice by Voice or Text to Log a call and more

Posted: 22 Feb 2014 15:28
by angelatwork
Hi this is a rather long flow if anyone is interested.

The flow lets you choose if you want to log the call that just ended, write it to file with different variables (length, name and so on) on your device and upload the file to dropbox. If you are connected to a bluethooth device, you will answer (make your choice) by voice (Speech Input), else by Confirmation Dialog.

You will have to tweak it a bit for you own needs though.
If you have improvements or other feedback, please post it :-)

http://automagic4android.com/flow.php?i ... 42b2683aeb

Important about the file you write!
If you want the call duration in HH:mm:ss (not only in seconds or as text), do not change the time zone setting UTC in the script.
Write to file: You will have to choose your own path and make a folder and name the file. You may want to change the file extension and the delimiter in the file ";" semicolon to "," comma or something else depending on your needs.

I have made my file (to write to) in advance with notepad++, coding it in UTF8 with BOM , with headings and ";" semicolon in between as delimiter and saved it with a .csv extension. All this to be able to easily open the file in excel without having to import it through the Import Text Guide in Excel.

The trigger is an incoming call ending. I use a copy of the flow for outgoing calls but with outgoing as a trigger. (i have not seen a way to use a trigger for both incoming and outgoing calls.)

The condition is whether you have a bluetooth connected or not. You will have to choose/change the bluetooth device to your own.

If not connected:
(Sound "Opener") Confirm Dialog with a question. In my case it says in Swedish "was this a job related call?"
if you choose yes (Ja in Swedish).
The phone call is logged =init variables call log, script for call duration in the format HH:mm:ss, write to file.
There is a Speech Output in Swedish (change to your own language) to confirm that it is done.
After that The file is uploaded to Dropbox (change the folder path and name the file).

If you choose no (Nej) as Input, an Speech Output confirms that the call is skipped and not logged (in Swedish).

If bluetooth is connected;
Speech Output asks you the same question (Swedish),
Speech input starts, the text the Android thinks you said as an answer is shown on your phone (notification on screen)
An expression tries to match your answer to *ne* (part of No in Swedish)
If successful, Speech Output in Swedish says the phonecall was not logged.

Else an expression that tries to match the answer with *ye* (*ja*)
If successful it continues into the part of the flow that writes the log to file and so on.

If not successful, Speech Output, "sorry, I did not hear what you said. Did you say (value). Can you please answer again, yes or no?" (in Swedish)
And loop back to Input Speech.