What is the difference between this context and getapplicationcontext ? which one to use when?
no difference, both are same
this points to entire process, appcontext points to current class.
this points to current context, application context points to entire process. if your context is of entire life time of process then use app context, else this.
both option 2 and 3 are correct
this pointer always points to current class object, app context will point to entire process. there is only one app context. if you want to use some control whose life time is through out your application life time then go for app context, else use this pointer (activity context).
Dear sir can you elaborate this
"application context points to entire process"
Back To Top