Difference between Activity Context and Application Context

This has me stumped, I was using this in Android 2.1-r8 SDK:

ProgressDialog.show(getApplicationContext(), ....);

and also in

Toast t = Toast.makeText(getApplicationContext(),....);

using getApplicationContext() crashes both ProgressDialog and Toast …. which lead me to this question:

What is the actual differences between a activity context and application context, despite sharing the wording ‘Context’?

7 Answers
7

Leave a Comment