1
我试图使用共享意图,但我认为它无法正常工作。在共享应用程序列表中,Facebook或Pinterest不会显示,但Gmail或云打印可以。 我希望所有可能的应用程序都出现在那里。Android共享意图问题
这是我的代码。 感谢您的任何建议。
final Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "App name");
shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, "");
startActivity(Intent.createChooser(shareIntent, "Share via..."));
根据定义,所有可能的应用是* *出现在那里。并非每个应用程序都设置为共享纯文本。 – CommonsWare
ohh ...我不知道,谢谢你的解释 – Twilie2012
有关使用意图的Facebook共享的更多信息:http://stackoverflow.com/questions/7545254/android-and-facebook-share-intent(如果你想分享一个链接,例如,你仍然可以用纯粹的意图做到这一点,没有Facebook SDK。) – Jonik