Is there a way to get the current Context instance by using a static method?
I'm looking for that way because i hate saving the context instance each time it changes.
Bests :)
Is there a way to get the current Context instance by using a static method?
I'm looking for that way because i hate saving the context instance each time it changes.
Bests :)
No, I don't think there is. Unfortunately, you're stuck calling getApplicationContext()
from Activity
or one of the other subclasses of Context
. Also, this question is somewhat related.