有没有办法检查短信是否在j2me中以编程方式成功发送
我有一个简单的 j2me 应用程序,它将短信发送到某个单元号,然后在成功后删除某个记录。但有时会因为网络、电池等多种原因而失败。有没有办法验证短信是否成功发送?
谢谢, 切苏亚
I have a simple j2me application that send sms to a certain cell no and then erase a certain record once it succeed. But sometimes it fails due to several reasons like network, battery, etc. Is there a way to validate if an sms message is successfully sent?
Thanks,
czetsuya
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当在发送短信的代码上使用 try catch 时,如果抛出异常,则发生错误,否则消息发送成功,因此,如果您没有收到错误,则表示发送成功,
您可以检查它下面的例子:
When using a try catch on the code that will send an sms, if an exception is thrown then an error occured, else the message is sent successfully, so if you didn't got an error than it is sent successfully
You can check it in the example below:
如果此行在 this< 中成功执行/a> 示例,则必须发送,否则将引发异常
if this line is successfully executed in this example then it must be sent else exception would be thrown