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 Weather App (2015) Working with JSON Introducing JSONObject

Tohin Sarker
PLUS
Tohin Sarker
Courses Plus Student 341 Points

mCurrentWeather = getCurrentDetails()

i didnt understand this point why mCurrentWeather = getCurrentDetails()

please explain it details

1 Answer

mCurrentWeather is a member variable of the CurrentActivity class, as you can see at 0:21 of the video.

At 1:02 In the video, if the response is successful, the code initializes the mCurrentWeather variable by calling the getCurrentDetails() method and assigning to the member variable the JSON data the method returns. Otherwise it alerts the user.