@
zictos 我在用这个 tasker 任务删除短信,供参考:
<TaskerData sr="" dvi="1" tv="6.1.32">
<Task sr="task113">
<cdate>1594959102332</cdate>
<edate>1695362269091</edate>
<id>113</id>
<nme>SMS Delete</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%sms</Str>
<Str sr="arg1" ve="3">%SMSRF</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Int sr="arg5" val="3"/>
<Int sr="arg6" val="0"/>
</Action>
<Action sr="act1" ve="7">
<code>667</code>
<label>gets ID of latest sms received.</label>
<Int sr="arg0" val="2"/>
<Str sr="arg1" ve="3">content://sms</Str>
<Int sr="arg10" val="1"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3">_id</Str>
<Str sr="arg4" ve="3">address = ?</Str>
<Str sr="arg5" ve="3">%sms</Str>
<Str sr="arg6" ve="3">date DESC limit 1</Str>
<Str sr="arg7" ve="3"/>
<Str sr="arg8" ve="3">%sms_id</Str>
<Int sr="arg9" val="0"/>
</Action>
<Action sr="act2" ve="7">
<code>137</code>
<label>stop if get ID failed.</label>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%sms_id1</lhs>
<op>13</op>
<rhs>0</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act3" ve="7">
<code>664</code>
<label>I assume this action take the SMS ID from URI and parse it for use in the future?</label>
<Str sr="arg0" ve="3">uri</Str>
<Str sr="arg1" ve="3">Uri</Str>
<Str sr="arg2" ve="3">parse
{Uri} (String)</Str>
<Str sr="arg3" ve="3">content://sms/%sms_id1</Str>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Str sr="arg8" ve="3"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act4" ve="7">
<code>664</code>
<label>I think this action gets the content from the parsed URI?</label>
<Str sr="arg0" ve="3">cr</Str>
<Str sr="arg1" ve="3">CONTEXT</Str>
<Str sr="arg2" ve="3">getContentResolver
{ContentResolver} ()</Str>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Str sr="arg8" ve="3"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act5" ve="7">
<code>664</code>
<label>And this action is most likely the action that delete the SMS in the parsed URI.</label>
<Str sr="arg0" ve="3"/>
<Str sr="arg1" ve="3">cr</Str>
<Str sr="arg2" ve="3">delete
{int} (Uri, String, String[])</Str>
<Str sr="arg3" ve="3">uri</Str>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Str sr="arg8" ve="3"/>
<Str sr="arg9" ve="3"/>
</Action>
</Task>
</TaskerData>