Need Help With Removing Entry From Call Log With Java Functions..
EDIT... Not sure exactly what I changed but this does seem to be working for me now...
Some of these numbers seem to be stuck in the call log.
After actually dialing them and putting them at the top of the call log, I was able to delete them all from the call log..
¯\\\_(ツ)\_/¯
I am trying to delete spam calls from my call log. The tasker action 'Call Screening' does not work to 'skip call log' on my device. I am currently answering the call with Tasker then ending the call. This works as expected, however I would like to remove the call from the call log as well.
Edit - Using rooted - Pixel 7 Pro - Android 14 - Jan update
I am trying this Java Function approach as found in this [Post]( https://www.reddit.com/r/tasker/s/uSuDLHe9yY ).
Task: Delete Phone Log
A1: Variable Set [ Name: %number To: +18335879098 ]
A2: Variable Set [ Name: %provider To: content://call_log/calls Structure Output (JSON, etc): On ]
A3: Java Function [ Return: cres Class Or Object: CONTEXT Function: getContentResolver {ContentResolver} () ]
A4: Java Function [ Return: call_log_uri Class Or Object: Uri Function: parse {Uri} (String) Param 1 (String): %provider ]
A5: Java Function [ Class Or Object: cres Function: delete {int} (Uri, String, String[]) Param 1 (Uri): call_log_uri Param 2 (String): "number = '%number' " ]
If I use a "Contact" name with the following as a parameter in action A5
``` "name = 'John Doe' " ```
Then the delete works as expected.
I can not get it to work with a number at all. I have tried many multiple combinations to include of the following..
``` "number = '+18773314216' "
"number = '18773314216' "
"number = '8773314216' "
"noramilized_number = '+18773314216' "
"noramilized_number = '18773314216' "
"noramilized_number = '8773314216' "
"noramilized_number = '%+18773314216' "
"noramilized_number = '%18773314216' "
"noramilized_number = '%8773314216' "
As well as replacing = with 'LIKE' for all of the above..
```
Any ideas on what I am missing here???
Thanks, Rich..