首页 > 解决方案 > 使用意图 android 发送短信后返回我的应用程序

问题描述

我正在使用意图发送短信。

 Intent intent = new Intent(Intent.ACTION_SENDTO);
 intent.setData(Uri.parse("smsto:" + phoneNumber));
 intent.putExtra("address", phoneNumber);
 intent.putExtra("sms_body", messageBody);
 intent.putExtra("exit_on_sent", true);
 startActivityForResult(intent, 6789);
  1. 我怎样才能让它返回到我的应用程序的结果?目前它停留在“消息”视图中。
  2. 是否有任何广播接收器可以知道短信是否已发送或传递?

标签: androidandroid-intent

解决方案


推荐阅读