gpt4 book ai didi

android - 分享意向不给我一个选择

转载 作者:行者123 更新时间:2023-11-29 22:04:07 25 4
gpt4 key购买 nike

我正在开发一个应用程序,我想在其中通过 facebook、twitter、gmail、消息或 share intent 提供的更多选项共享我的数据,只需转到此代码即可。 .

     Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND_MULTIPLE );
sharingIntent.setType("text/plain");
String shareBody = "Here is the share content body";
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject Here");
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);
startActivity(Intent.createChooser(sharingIntent, "Share via"));

但这里的问题是,当我运行一个应用程序时,它只显示消息屏幕(其中 to blah blah,键入撰写和发送按钮)我不能给我所有这些选项。所以请帮我解决这个...

最佳答案

如果您使用的是模拟器,这是因为消息是唯一安装的可以处理该类型共享的应用程序。您只能分享到已安装的应用程序,即,如果未安装 Twitter 客户端,则无法分享到 Twitter。

关于android - 分享意向不给我一个选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11220202/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com