如何使用本地短信作曲家发送短信回来后返回意图 [英] How to return back to intent after sending sms using native sms composer
本文介绍了如何使用本地短信作曲家发送短信回来后返回意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用下面code发送使用本地短信作曲家短信
I'm using below code for sending sms using native sms composer
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.putExtra("address", "1234567890");
intent.putExtra("sms_body", "Hai");
intent.setData(Uri.parse("smsto:"+"1234567890"));
//intent.putExtra("exit_on_sent", true);
startActivityForResult(intent, 1);
这是工作,但发送短信后,它没有返回回我的活动。如果我把intent.putExtra(exit_on_sent,真正的);那么短信的身体呈现在短信作曲家空。
It is working but after sending sms, its not returning back to my activity. If I put intent.putExtra("exit_on_sent", true); then sms body is showing empty in sms composer.
我要显示的内容作曲家,它应该发送短信后,返回到我的活动。
实现这个?任何方式
I want showing content in composer and it should return back to my activity after sending sms. Any way to implement this??
推荐答案
试试这个
intent.setData(Uri.parse("smsto:"+"1234567890"));
intent.putExtra("address", "1234567890");
intent.putExtra("sms_body", "Hai");
intent.putExtra("exit_on_sent", true);
startActivityForResult(intent, INVITE_COMPLETED);
这篇关于如何使用本地短信作曲家发送短信回来后返回意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文