In an Android app when I need to start a new activity, what's the difference on using the current activity context X application context?
3 Answers
The context of an application is the state your phone is in when you are within an application.
You use this context to refer to the application's UI elements and resources.
When you switch context, the application follows the Android application lifecycle.
You use the current context to start a new activity within an application.
Like this:
Intent i = new Intent(activity, com.MainApp.ActivityToStart);
currentActivity.startActivity(i);
Hope this helps.

- 12,157
- 10
- 53
- 91
Application context has information about whole application life cycle while activity context has information about a particular activity. You should use activity context instead of Application context because it is the recommended way. Read this for more details
Android documentation says
public Context getApplicationContext ()
Return the context of the single, global Application object of the current process. This generally should only be used if you need a Context whose lifecycle is separate from the current context, that is tied to the lifetime of the process rather than the current component
.

- 29,856
- 10
- 92
- 122