英文:
Get failed sent SMS on Samsung Android device with Tasker app
问题
我需要在三星Android(Galaxy S10)设备上自动尝试在一段时间后重新发送发送失败的短信(由于信号质量差、没有余额、没有插入SIM卡等)。
我找到了Tasker应用程序(也可以使用其他方法/建议来完成此任务)。
我尝试捕获Tasker的"SMS Failure"事件,但没有成功。在手册中有一个关于此事件的注释:"仅适用于Tasker的发送短信操作发送的短信"。但我需要捕获来自原生短信应用的发送失败事件。
我还尝试使用Tasker捕获Intent"com.samsung.intent.action.SMS_SEND_FAIL",但也没有成功(可能是意图名称错误?)。
由于没有包含短信数据(我需要短信接收者的电话号码和文本以尝试重新发送),所以LogCat条目解析也无用。
最后,我尝试从手机内部的原生数据库获取短信,但我只能获取到成功发送的短信和收件箱:
content://sms/inbox
- OK(收件箱)
content://sms/sent
- OK(成功发送)
content://sms
- OK(收件箱+已发送)
content://sms/all
- 空
content://sms/failed
- 空
content://sms/queued
- 空
content://sms/draft
- 空
content://sms/outbox
- 空
content://sms/undelivered
- 空
还有其他解决方案吗?非常感谢!
英文:
I need automatically try to resend failed outgoing SMS on Samsung Android (Galaxy S10) device after some period of time (due to poor signal quality, no credits, no SIM card inserted e.t.c.).
I have found Tasker app (any other ways/suggestions to do this thing would be also OK).
I have tried to catch Tasker SMS Failure
event, but it doesn't help. In the manual there is a note for this event: Only works for an SMS sent by Tasker's Send SMS action
. But I need to catch failure event from native SMS app.
I have also tried to catch Intent com.samsung.intent.action.SMS_SEND_FAIL
with Tasker. It doesn't work too (may be wrong intent name?).
LogCat entry parsing is also useless, because of no SMS data contains (I need SMS receiver phone number and text to try resending).
And finally I have tried to get SMS from phone internal native database, but I could get only successfully sent messages and inbox:
content://sms/inbox
- OK (incoming SMS)
content://sms/sent
- OK (successfully sent)
content://sms
- OK (inbox + sent)
content://sms/all
- empty
content://sms/failed
- empty
content://sms/queued
- empty
content://sms/draft
- empty
content://sms/outbox
- empty
content://sms/undelivered
- empty
Any other solutions? Many thanks!
答案1
得分: 0
以下是翻译好的内容:
这是我的脏解决方案(需要root权限)。
<TaskerData sr="" dvi="1" tv="6.1.32">
<Profile sr="prof12" ve="2">
<cdate>1691745640721</cdate>
<edate>1691750328401</edate>
<flags>8</flags>
<id>12</id>
<limit>true</limit>
<mid0>13</mid0>
<nme>Failed SMS Retry</nme>
<Time sr="con0">
<fh>6</fh>
<fm>0</fm>
<rep>2</rep>
<repval>10</repval>
<th>23</th>
<tm>0</tm>
</Time>
</Profile>
<Task sr="task13">
<cdate>1691745663215</cdate>
<edate>1691750291965</edate>
<id>13</id>
<nme>Process Failed Sms</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>667</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3">/data/data/com.android.providers.telephony/databases/mmssms.db</Str>
<Int sr="arg10" val="1"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3">SELECT _id, address, body, type FROM sms WHERE [type] = 5 ORDER BY _id ASC LIMIT 1</Str>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3">∆</Str>
<Str sr="arg8" ve="3">%SMSES</Str>
<Int sr="arg9" val="0"/>
</Action>
<Action sr="act1" ve="7">
<code>548</code>
<on>false</on>
<Str sr="arg0" ve="3">%SMSES(1)</Str>
<Int sr="arg1" val="1"/>
<Str sr="arg10" ve="3"/>
<Int sr="arg11" val="1"/>
<Int sr="arg12" val="0"/>
<Str sr="arg13" ve="3"/>
<Int sr="arg14" val="0"/>
<Str sr="arg15" ve="3"/>
<Int sr="arg2" val="0"/>
<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"/>
<Int sr="arg9" val="1"/>
</Action>
<Action sr="act2" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%SMS</Str>
<Str sr="arg1" ve="3">%SMSES(1)</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="1"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%SMSES(#)</lhs>
<op>0</op>
<rhs>1</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act3" ve="7">
<code>590</code>
<Str sr="arg0" ve="3">%SMS</Str>
<Str sr="arg1" ve="3">∆</Str>
<Int sr="arg2" val="1"/>
<Int sr="arg3" val="0"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%SMSES(#)</lhs>
<op>0</op>
<rhs>1</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act4" ve="7">
<code>548</code>
<on>false</on>
<Str sr="arg0" ve="3">%SMS3</Str>
<Int sr="arg1" val="1"/>
<Str sr="arg10" ve="3"/>
<Int sr="arg11" val="1"/>
<Int sr="arg12" val="0"/>
<Str sr="arg13" ve="3"/>
<Int sr="arg14" val="0"/>
<Str sr="arg15" ve="3"/>
<Int sr="arg2" val="0"/>
<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"/>
<Int sr="arg9" val="1"/>
</Action>
<Action sr="act5" ve="7">
<code>667</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3">/data/data/com.android.providers.telephony/databases/mmssms.db</Str>
<Int sr="arg10" val="1"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3">DELETE FROM sms WHERE [type] = 5 AND _id = %SMS1</Str>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Str sr="arg8" ve="3">%XXX</Str>
<Int sr="arg9" val="0"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%SMSES(#)</lhs>
<op>0</op>
<rhs>1</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act6" ve="7">
<code>667</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3">/data/data/com.android.providers.telephony/databases/mmssms.db</Str>
<Int sr="arg10" val="1"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3">UPDATE sms SET [type] = 2 WHERE [type] = 5 AND _id = %SMS1</Str>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Str sr="arg8" ve="3">%XXX</Str>
<Int sr="arg9" val="0"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%SMSES(#)</lhs>
<op>0</op>
<rhs>1</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act7" ve="7">
<code>41</code>
<Str sr="arg0" ve="3">%SMS2</Str>
<Str sr="arg1" ve="3">%SMS3</Str>
<Int sr="arg2" val="0"/>
<Str sr="arg3" ve="3"/>
<Int sr="arg4" val="0"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%SMSES(#)</lhs>
<op>0</op>
<rhs>1</rhs>
</Condition>
</ConditionList>
</Action>
</Task>
</TaskerData>
英文:
Here is my dirt solution (root required).
<TaskerData sr="" dvi="1" tv="6.1.32">
<Profile sr="prof12" ve="2">
<cdate>1691745640721</cdate>
<edate>1691750328401</edate>
<flags>8</flags>
<id>12</id>
<limit>true</limit>
<mid0>13</mid0>
<nme>Failed SMS Retry</nme>
<Time sr="con0">
<fh>6</fh>
<fm>0</fm>
<rep>2</rep>
<repval>10</repval>
<th>23</th>
<tm>0</tm>
</Time>
</Profile>
<Task sr="task13">
<cdate>1691745663215</cdate>
<edate>1691750291965</edate>
<id>13</id>
<nme>Process Failed Sms</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>667</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3">/data/data/com.android.providers.telephony/databases/mmssms.db</Str>
<Int sr="arg10" val="1"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3">SELECT _id, address, body, type FROM sms WHERE [type] = 5 ORDER BY _id ASC LIMIT 1</Str>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3">∆</Str>
<Str sr="arg8" ve="3">%SMSES</Str>
<Int sr="arg9" val="0"/>
</Action>
<Action sr="act1" ve="7">
<code>548</code>
<on>false</on>
<Str sr="arg0" ve="3">%SMSES(1)</Str>
<Int sr="arg1" val="1"/>
<Str sr="arg10" ve="3"/>
<Int sr="arg11" val="1"/>
<Int sr="arg12" val="0"/>
<Str sr="arg13" ve="3"/>
<Int sr="arg14" val="0"/>
<Str sr="arg15" ve="3"/>
<Int sr="arg2" val="0"/>
<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"/>
<Int sr="arg9" val="1"/>
</Action>
<Action sr="act2" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%SMS</Str>
<Str sr="arg1" ve="3">%SMSES(1)</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="1"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%SMSES(#)</lhs>
<op>0</op>
<rhs>1</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act3" ve="7">
<code>590</code>
<Str sr="arg0" ve="3">%SMS</Str>
<Str sr="arg1" ve="3">∆</Str>
<Int sr="arg2" val="1"/>
<Int sr="arg3" val="0"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%SMSES(#)</lhs>
<op>0</op>
<rhs>1</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act4" ve="7">
<code>548</code>
<on>false</on>
<Str sr="arg0" ve="3">%SMS3</Str>
<Int sr="arg1" val="1"/>
<Str sr="arg10" ve="3"/>
<Int sr="arg11" val="1"/>
<Int sr="arg12" val="0"/>
<Str sr="arg13" ve="3"/>
<Int sr="arg14" val="0"/>
<Str sr="arg15" ve="3"/>
<Int sr="arg2" val="0"/>
<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"/>
<Int sr="arg9" val="1"/>
</Action>
<Action sr="act5" ve="7">
<code>667</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3">/data/data/com.android.providers.telephony/databases/mmssms.db</Str>
<Int sr="arg10" val="1"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3">DELETE FROM sms WHERE [type] = 5 AND _id = %SMS1</Str>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Str sr="arg8" ve="3">%XXX</Str>
<Int sr="arg9" val="0"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%SMSES(#)</lhs>
<op>0</op>
<rhs>1</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act6" ve="7">
<code>667</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3">/data/data/com.android.providers.telephony/databases/mmssms.db</Str>
<Int sr="arg10" val="1"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3">UPDATE sms SET [type] = 2 WHERE [type] = 5 AND _id = %SMS1</Str>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Str sr="arg8" ve="3">%XXX</Str>
<Int sr="arg9" val="0"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%SMSES(#)</lhs>
<op>0</op>
<rhs>1</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act7" ve="7">
<code>41</code>
<Str sr="arg0" ve="3">%SMS2</Str>
<Str sr="arg1" ve="3">%SMS3</Str>
<Int sr="arg2" val="0"/>
<Str sr="arg3" ve="3"/>
<Int sr="arg4" val="0"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%SMSES(#)</lhs>
<op>0</op>
<rhs>1</rhs>
</Condition>
</ConditionList>
</Action>
</Task>
</TaskerData>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论