9

I am busy learning android and I came across the getApplicationContext method. I didn't really understand what it was used for and what it's purpose is.

Siddharth
  • 8,842
  • 13
  • 79
  • 133
DLJ
  • 325
  • 2
  • 6
  • 18
  • http://stackoverflow.com/questions/7298731/when-to-call-activity-context-or-application-context. check the link – Raghunandan May 21 '13 at 16:55

1 Answers1

4

The Context object is used across the application to do many things like access resources that the Android OS has allocated for you.

  • using getSystemService, you get the handle of your service and you can do wonders.
  • pass the context object to your classes to do Toast

It is useful and powerful if used correctly.

Siddharth
  • 8,842
  • 13
  • 79
  • 133