我想在我的应用程序中添加共享选项,我可以将图像共享到手机中安装的任何应用程序(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"));
答案 0 :(得分:0)
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
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"));