【问题标题】:Android studio send text from share intent [duplicate]Android Studio从共享意图发送文本[重复]
【发布时间】:2015-04-08 00:38:08
【问题描述】:

大家好,我正在为一个班级开发一个 android studio 应用程序。我正在尝试使用 shareIntent 从列表视图共享文本。 我有一个名为 giftarray 的变量,它是一个字符串 []

这是我在java中调用的方法

Public void intent (){ 

Intent sharingIntent = nee Intent         (Intent.ACTION_SEND);

sharingIntent.setType     ("text/html");
sharingIntent.putExtra (?????);
startActivity       (Intent.createChooser (sharingIntent, "Share using"));


}

我应该在 .putExtra 中添加什么来将 String [] 发送到选择的任何共享应用程序。那么用户可以导出列表视图吗?

【问题讨论】:

    标签: java android android-intent


    【解决方案1】:

    下次尝试多看一下 SO,您会惊讶地发现已经提出了多少问题,而且您甚至可能无需提问即可找到您要查找的内容。

    无论如何,我建议您参考这两个关于在活动之间传递数组的 SO 问题:

    1. With use of Bundles

    2. Without use of a Bundle

    【讨论】:

      猜你喜欢
      • 2012-02-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多