android - 使用意图 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);
- 我怎样才能让它返回到我的应用程序的结果?目前它停留在“消息”视图中。
- 是否有任何广播接收器可以知道短信是否已发送或传递?
解决方案
推荐阅读
- gradle - 如何在 Github Actions 中将 Checkstyle 结果报告为拉取请求注释?
- php - 如何不修改 php-cs-fixer 的某些注释?
- ios - 我们是否应该避免手动清除 iOS tmp 和 Caches 文件夹?
- react-native - Expo: Invariant Violation: ListView 已被删除 - 但我不使用 ListView
- javascript - 为什么当我在 React 中使用 props.element 时它变得未定义?
- vb.net - 将值分配给另一个 CSV 文件
- html - 如何防止引导表增长我的容器
- c# - 在 WPF 应用程序中添加 XAML 矢量图形
- python - 欧拉计划第 87 题,主要三元组
- java - 如何使 EditText 不允许输入任何数字?