What is the difference between getContext() , getApplicationContext() , getBaseContext() , and \"this\"?
getContext()
getApplicationContext()
getBaseContext()
this
Though
getApplicationContext() - Returns the context for all activities running in application. getBaseContext() - If you want to access Context from another context within application you can access. getContext() - Returns the context view only current running activity.
getApplicationContext() - Returns the context for all activities running in application.
getBaseContext() - If you want to access Context from another context within application you can access.
getContext() - Returns the context view only current running activity.