Welcome to the Treehouse Community
Looking to learn something new?
Challenge Task 1 of 4
Let's write a Share Intent that shares the Treehouse website with available apps on the user's device. Create a new Intent variable, and initialize it as a Share Intent.
String textToShare = "Learn something new at www.teamtreehouse.com"; // YOUR CODE HERE shareIntent intent= new ShareIntent();
Seth Kroger56,403 Points
Intents usually don't come in different subtypes. You create an vanilla Intent passing in a constant for the action you intend to perform. (One extra hint. there isn't a "share" action but there is a "send" action which amounts to the same thing.)
Intent shareIntent = new Intent(Intent.ACTION_SEND);
FINALLY I GOT IT Intent.putExtra(Intent.EXTRA_TEXT, textToShare);