0

Hey guys I'm working on an android studio app for a class. I'm trying to share text from a listview using a shareIntent. I have a variable called giftarray which is a String []

Here is my method called in java

Public void intent (){ 

Intent sharingIntent = nee Intent         (Intent.ACTION_SEND);

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


}

What do I put in .putExtra to send the String [] to whichever share application is chosen. So the user can export the listview?

JSON C11
  • 11,272
  • 7
  • 78
  • 65
bp01442
  • 69
  • 9

1 Answers1

2

Try to look through SO a bit more next time, you'd be surprised how many questions have already been asked and you might just find what you're looking for without having to even ask.

In any case I'd suggest you refer to these two SO questions regarding passing Arrays between activities:

  1. With use of Bundles

  2. Without use of a Bundle

Community
  • 1
  • 1
Cai
  • 5,063
  • 3
  • 18
  • 23