Android分享意向 [英] Android Share Intent
本文介绍了Android分享意向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何实现在这样的对话框中共享一些文本的意图?
How can implement an intent for sharing some text in a dialog like this ?
推荐答案
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..."));
}
这篇关于Android分享意向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文