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
Call a contact in phonebook via voice
Moderator: Martin
Re: Call a contact in phonebook via voice
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
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
-
- Posts: 6
- Joined: 09 May 2015 21:03
Re: Call a contact in phonebook via voice
Hi Martin,
It works. Thanks.
It works. Thanks.
Re: Call a contact in phonebook via voice
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!
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
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
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