View RSS Feed

Android Context

  1. Android Application Context

    by , 02-11-2012 at 10:43 AM
    For all the core application functionality, application context is central location. It is used to access resources that are shared between activity instances and is used to access settings. Use getApplicationContext() method to get the application context for current process.

    Java Code:
    Context context =  getApplicationContext()
    You can also use this object when writing code in your Activity class because Activity class is derived from the Context class. After ...