View RSS Feed

Android Developer

Android Application Context

Rate this Entry
by , 02-11-2012 at 10:43 AM (3059 Views)
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 getting this valid application context, you can access features and services at system level.

Submit "Android Application Context" to Facebook Submit "Android Application Context" to Digg Submit "Android Application Context" to del.icio.us Submit "Android Application Context" to StumbleUpon Submit "Android Application Context" to Google

Comments