Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBinyamin Friedman
14,615 PointsWhat is the name of the activity variable that I am meant to use?!
The question is in the title.
String textToShare = "Learn something new at www.teamtreehouse.com";
// YOUR CODE HERE
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, textToShare);
mActivity.startActivityForResult(Intent.createChooser(intent, "Share"), 1);
1 Answer
Tony Gemenie
3,781 PointsHey Binyamin Everything looks pretty good man. The step four isn't asking for a specific activity to start it's asking you to start the intent so you don't need the mActivity portion. On your second call on that line you're not looking for a result from the activity so that should be changed and when you change that you won't need the int. You're close though man keep going.