Page 1 of 1
Call a contact in phonebook via voice
Posted: 06 Sep 2015 21:45
by bulentcandan
Hi,
I try to make a flow that can call someone in my phonebook via voice command.
- Action: Shortcut
- Action: Input Speech
Ex. Ben
- Action: Call Number
But I can only enter number to "Number" field of "Action: Call Number". When I enter {value} to "Number" field, phone dials 236. Is it possible to develop "Action: Call Number" to enter contact name.
Or, how can I call a contact in my phonebook via voice command with a simple flow? Phone OS is Android 2.3.6.
Thanks,
Bülent Candan
Re: Call a contact in phonebook via voice
Posted: 08 Sep 2015 14:12
by Martin
Hi,
You could use the action Query Content Provider to search the numbers by name.
Following configuration should work (untested on Android 2.3):
Content URI: content://com.android.contacts/data/phones
Projection: data1 (or data4 to get normalized numbers)
Selection: display_name like '%YourContact%' respectively display_name like '%{value}%'
Result Type: Single value or List (depends on how you would like to handle cases when a contact has multiple numbers)
Variable: number or number_list (depends on Result Type)
Integrating some actions to query the contacts in a more comfortable way is on my todo-list.
Regards,
Martin
Re: Call a contact in phonebook via voice
Posted: 08 Sep 2015 21:13
by bulentcandan
Hi Martin,
It works. Thanks.
Re: Call a contact in phonebook via voice
Posted: 01 Jan 2016 00:52
by Zimtsäure
A happy new year to all and everybody!
Could please someone help me in this case: using display_name like '%{value}%' does not deliver something.
In my case I put the avcommnofilter instead ot value. avcommnofilter has the right value of the contact as saved in the phonebook.
My selection looks so: display_name like '%{avcommnofilter}%'
An interesting observation: If i put only {avcommnofilter} or %{avcommnofilter}% (without the apostrophe), it has the value inside but produces exceptions.
Thanks!
Re: Call a contact in phonebook via voice
Posted: 04 Jan 2016 20:32
by Martin
Hi,
Your example code looks OK to me.
What does avcommnofilter contain? Please add a condition Debug Dialog just before the Query Content Provider action to see if it contains the value you'd expect.
Regards,
Martin