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 trial

Android Build a Blog Reader Android App Using Intents to Display and Share Posts Opening a Webpage Within the App

Rob Whelan
Rob Whelan
3,481 Points

How to get the Intent variable from the other class?

Hello-- I'm not sure how to finish this code challenge. I'm not sure how the WebViewActivity class (which extends Activity) has access to variables inside methods of the CustomListActivity class.

1 Answer

Rob Whelan
Rob Whelan
3,481 Points

Here is the text from the code challenge: In the 'onCreate()' method, get the Intent that was used in CustomListActivity to start this activity and store it in an Intent variable.

Lisa Steendam
Lisa Steendam
6,825 Points

Intent intent = getIntent();