【发布时间】:2015-04-27 05:58:07
【问题描述】:
我想在我的应用程序中添加共享选项,我可以将图像共享到移动设备中安装的任何应用程序(Facebook、Twitter、watsapp、Gmail)。但是当我使用下面的代码时,它只显示下面提到的应用程序,如下图所示。如何添加其他应用。
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.setType("IMAGE/png");
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml("<p>This is the text that will be shared.</p>"));
startActivity(Intent.createChooser(sharingIntent,"Share using"));
【问题讨论】:
-
你的设备上安装了whats app、twitter和facebook吗?
-
是的应用已经安装
标签: android eclipse facebook android-intent