Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/183.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 安卓共享意向_Android_Email_Android Intent_Share - Fatal编程技术网

Android 安卓共享意向

Android 安卓共享意向,android,email,android-intent,share,Android,Email,Android Intent,Share,如何实现在这样的对话框中共享某些文本的意图 这里有: Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_TEXT, YOUR_TEXT_TO_SEND); startActivity(Intent.createChooser(intent, "Share with")); 你也可以使用我的图书馆。有关详细信息,请参见演示应用程序您想

如何实现在这样的对话框中共享某些文本的意图

这里有:

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, YOUR_TEXT_TO_SEND);
startActivity(Intent.createChooser(intent, "Share with"));

你也可以使用我的图书馆。有关详细信息,请参见演示应用程序

您想发送或接收这些意向吗?我已将此问题的标题复制到搜索引擎中。猜猜我发现了什么-谷歌是你的朋友
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse(filePath));
try
{
    startActivity(Intent.createChooser(intent, "Sending File..."));
}