These are chat archives for gdg-hudson-valley/android-guide

5th
Jan 2016
Yash Thakur
@yashthakur1
Jan 05 2016 11:02
hey anyone has idea on getting context in a non activity class
without passing parameters everytime while calling a function
Hendrix Tavarez
@lockerfish
Jan 05 2016 14:14
@yashthakur1 it depends on the the type of stuff you need to preserve in your context. The way I typically think about it is if it is stuff related to the lifecycle of an activity then use Activity Context otherwise use Application Context. Application context is there for the lifetime of the app. So, it survives activity lifecycle probably that's what you need. As a side note, don't keep presumably memory leaky stuff.
in your Application Context.. keep it lightweight.