2017-11-11 163 views
1

我使用ACTION_SEND时获取默认活动名称。如何将标题从活动名称更改为我想要选择的标题?标题意图在Android应用程序中的Action_SEND

到目前为止已经使用以下

Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND); 
sharingIntent.setType("text/plain"); 
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "My subject"); 
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, finalUrl); 
startActivity(Intent.createChooser(sharingIntent, getResources().getString(R.string.app_name))); 
+0

你想做什么..请解释我的意思告诉我你的完整要求 –

+0

我想发送网址到另一个应用程序。为此,我使用了Intent Action_SEND。但打开的盒子将活动名称视为标题。我想将标题更改为“通过发送URL”。 – user8892189

+0

意思是你想分享应用程序的权利 –

回答

1

您可以使用以下

startActivity(Intent.createChooser(sharingIntent, “你的标题”)))设置称号;

相关问题