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!
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
Ganta Hemanth6,460 Points
Context in Android
What is the significance of context in android? How does it work?? I read the android documentation but i am unable to get it clearly. It would be great if someoen could help me understand by using a real world example.
Harry James14,780 Points
Hey there Ganta!
When I first started learning Android programming, I felt the same about the context object, it's quite difficult to get your head around at first but, in basic terms, it's used to access the current state of an application or object (So that we can access its objects or its details).
As you're looking for a real-life answer, I couldn't put it any better than Devrath did on the StackOverflow forums so I highly recommend you check his answer out!
Hopefully this should make sense but, if there's still something that doesn't make sense, I'll try my best to explain it for you :)