本文介绍了返回到活动后的动作在Android中完成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我启动SMS应用程序中使用下面的方法 - 一切正常,直到那里的邮件发送点。当我发送消息 - 它从来没有导航回原来的活动,除非我preSS后退按钮。我怎样才能启动SMS活动,然后一旦消息被送到了父活动再次显示?
这是我如何打电话与结果的短信应用程序。
字符串消息= getMessageString(); 意图sendIntent =新的意图(Intent.ACTION_SENDTO); sendIntent.setData(Uri.parse(短信:+号)); sendIntent.putExtra(sms_body,邮件); startActivityForResult(sendIntent,INVITE_COMPLETED);解决方案
这是可能的。只需要添加以下额外的你的意图:
sendIntent.putExtra(exit_on_sent,真正的);When I start the SMS application using the following methods -- everything works fine up until the point where the message is sent. When I send the message -- it never navigates back to the original activity unless I press the back button. How can I start the SMS activity and then once the message is sent have the parent activity showed again?
This is how I call the SMS app with result.
String message = getMessageString(); Intent sendIntent = new Intent(Intent.ACTION_SENDTO); sendIntent.setData(Uri.parse("sms:" + number)); sendIntent.putExtra("sms_body", message); startActivityForResult(sendIntent, INVITE_COMPLETED);解决方案
It is possible. Just need to add the following extra to your intent:
sendIntent.putExtra("exit_on_sent", true);
更多推荐
返回到活动后的动作在Android中完成?
发布评论