【发布时间】:2014-03-18 15:18:43
【问题描述】:
我尝试使用doInBackground 中的AsyncTask 在我的android 应用程序中以编程方式发送短信,我有一个我想向其发送短信的收件人列表,问题是如果我在for 循环中发送它们,它有一个不稳定的行为有时应用程序崩溃有时消息未发送...我使用PendingIntent 确保消息离开设备,
smsManager.sendTextMessage("Mobile_NUmber",null, "MessageText", sentPI, null);
我能否实现某种机制,只有在收到第一条短信PendingIntent 的Broadcast 后才能发送下一条短信
【问题讨论】:
-
请看我对这个问题的回答:stackoverflow.com/questions/19083158/…
-
@cYrixmorten tnx 对于您的时间,我肯定会尝试实施您的解决方案,您能否指导我如何使用它来发送给多个收件人,例如在 for 循环中 ...
-
@cYrixmorten 好的,我想我现在明白了……
标签: android android-asynctask android-activity