T O P
OwlIsBack

Using "SQL Query" action, "URI Formatted" option. Provider of interest: `content://call_log/calls` Columns of interest: `number, normalized_number, type` `type = '5'` == Call rejected by the user. `type = '6'` == Call blocked automatically. Reference: **[How to use Tasker "SQL Query" + "Content Providers"](https://www.reddit.com/r/tasker/comments/o9wghn/how_to_get_detailed_info_about/)** - **[(Taskernet of "SQL Query" examples).](https://taskernet.com/shares/?user=AS35m8mZdKE5Rv3FSeXjl7%2FsAHH8f4gDXxMcc1R2P5maHog6g63CyZSyKhJZTA4RXoWl1YA%3D&id=Task%3AReddit+-+SQL+Query+%2B+Content+Providers+EGs)**


Upset_Letterhead1277

Hi thx,but sorry I'm Not so deep in programming. Please can you describe a little bit easier


OwlIsBack

Welcome. Eg.: A1: Wait [ MS: 0 Seconds: 4 Minutes: 0 Hours: 0 Days: 0 ] A2: SQL Query [ Mode: URI Formatted URI: content://call_log/calls Columns: type Order By: date DESC LIMIT 1 Variable Array: %last_call_type Continue Task After Error:On ] A3: If [ %last_call_type(1) = 5 ] A4: Flash [ Text: You rejected the call from contact: %CNAME From number: %CNUM Continue Task Immediately: On Dismiss On Click: On ] A5: End If Link the above Task as **Exit** to a "Call > Incoming" state Profile.


Upset_Letterhead1277

>(1) thx ... that works ... great :-)


OwlIsBack

You're welcome.


gaby424

Profile: Declinedd State: Call [ Type:Incoming Number:* ] Exit Task: Anon A1: Wait [ MS: 0 Seconds: 4 Minutes: 0 Hours: 0 Days: 0 ] A2: SQL Query [ Mode: URI Formatted File: content://call_log/calls Columns: type Order By: date DESC LIMIT 1 Variable Array: %last_call_type Use Global Namespace: On Continue Task After Error:On ] A3: If [ %last_call_type(1) = 5 ] A4: Flash [ Text: You rejected a call from: %CNAME From number: %CNUM Continue Task Immediately: On Dismiss On Click: On ] A5: End If I inserted all the info the same as you suggested above but my Task gave me an error at the SQL part. As you can see even if I selected mode to be URI Formatted the next row is "File" instead of URI even if the label of the content path is named URI in the SQL form.... But when I exported I see is File is this a bug? I have all the permission granted for call log and so. The tasker log file has that line with the error like this 23.00.00 Errignore 15.2 Anon.SQL Query, %last_call_type=%last_call_type can you help me fix it? I have android one 12 on Nokia x20 tasker 6


gaby424

I found the problem. I had to remove the LIMIT 1 part because now it is not accepted anymore for this content provider