1

Context is a quite vague concept which I haven't grasped yet. I've seen cases where using the wrong context caused an error (getting a telephony service manager using an activity context instead of application context). In other occasions I've used different contexts for the same thing and nothing different happened.

If let's say I use getApplicationContext() everywhere what effect would that have performance-wise?

What is the "guide" to decide which context I should use in each occasion?

Brian Tompsett - 汤莱恩
  • 5,438
  • 68
  • 55
  • 126
Anonymous
  • 3,974
  • 3
  • 34
  • 60
  • 1
    http://stackoverflow.com/questions/7298731/when-to-call-activity-context-or-application-context – Raghunandan Apr 10 '14 at 17:31
  • http://stackoverflow.com/questions/22966601/what-is-different-between-mainactivity-this-vs-getapplicationcontext/22967165#22967165 – Zohra Khan Apr 10 '14 at 17:47

0 Answers0