Diffinitive rules for using Android’s getBaseContext, getApplicationContext or using an Activity’s “this”

The getBaseContext() is the method of ContextWrapper. And ContextWrapper is, “Proxying implementation of Context that simply delegates all of its calls to another Context. Can be subclassed to modify behavior without changing the original Context.” (as per javadocs)

So this is used to delegate the calls to another context.

Leave a Comment