I've been trying to access the phone's contact list from Tasker for several days, but I have not been able to get it.
I've come to find out that apps that access contacts, use this permission:
<Uses-permission android: name = "android.permission.READ_CONTACTS" />
But I can not figure out how to implement it in Tasker.
All you need is to dump all the contacts into a variable, to be able to work with that data.
Greetings and thank you
I've come to find out that apps that access contacts, use this permission:
<Uses-permission android: name = "android.permission.READ_CONTACTS" />
> There's an SQL query action in the next update, but it's for files only currently.
>
> I will see if it's easily modifiable for internal DBs too.
Just curious if it would be possible to modify the current Tasker phone / test phone action to get all contact info?
Just curious if it would be possible to modify the current Tasker phone / test phone action to get all contact info?
Is this now possible to do without root? To look up contact names and numbers? I would also like to add this to my new app, as it stands, my user's have to copy and paste contact numbers.
Thanks
Phil
Is this now possible to do without root? To look up contact names and numbers?
Tbh I've been busy building this project without exploring new features so I must of missed the contact threads. Now the project is just about finished I'm interested in tweaking the UI as I get feedback from testers.
content://com.android.contacts/raw_contacts
From above you can get the contact name 'display_name' and his id 'contact_id. Then you would need another query to get phone numbers in
content://com.android.contacts/phone_lookup
However, I'm facing issues with duplicates because distinct selection does not work. Maybe Pent can help.
22.49.18/Variables doreplresult: |display_name like '%Alahdal%'| -> |display_name like '%Alahdal%'|
22.49.18/E SQL Query: %name -> %name
22.49.18/E SQL Query: URI cursor exception: java.lang.IllegalArgumentException: Invalid column distinct contact_id
22.49.18/E SQL Query: no cursor for query 'display_name like '%Alahdal%''
22.49.18/E result: stop task (error)
22.49.18/Variables doreplresult: |%name| -> |%name|
22.49.18/E Error: 1
22.49.18/MacroEdit action finished exeID 1 action no 1 code 667 status: Err next 1
I'm struggling with getting the numbers, I'm unsure of the columns. This is the first time I've used this.
I've tried putting %contact_id10 into the second SQL query in the column and then selection sections but both cause the error.
Test (251)
A1: SQL Query [ Mode:URI Formatted File:content://com.android.contacts/raw_contacts Table: Columns:contact_id Query: Selection Parameters: Order By: Output Column Divider: Variable Array:%contact_id Use Root:Off ]
A2: Flash [ Text:%contact_id10 Long:Off ]
A3: SQL Query [ Mode:URI Formatted File:content://com.android.contacts/phone_lookup Table: Columns: Query:%contact_id10 Selection Parameters: Order By: Output Column Divider: Variable Array:%nunber Use Root:Off ]