Top "Android-context" questions

Interface to global information about an application environment

Is it possible to get application's context in an Android Library Project?

I would like to get the context of application which has reference/hosted my library at run-time inside one class …

android android-context android-library
SharedPreferences application context vs activity context

I am using several SharedPreferences to store data in my app. Some preferences are used in a lot of activites. …

android sharedpreferences android-context
passing context as argument of DialogFragment

it's possible to pass a context variable to a DialogFragment? i've use this code inside dialog for passing a string: …

android android-dialogfragment android-context
How can I call getContentResolver in android?

I'm writing a library class to encapsulate some of my logic in my first Android app. One of the functions …

android android-context android-contentresolver
Context inside a Runnable

I try to play a sound from R.raw. inside a Thread/Runnable But I can't get this to work. …

android multithreading media-player runnable android-context
Android : Static Fields and Memory Leaks

I've been studying up on best practices for preventing Context/Activity memory leaks when creating views, and I can't seem …

android memory memory-leaks android-activity android-context
How to retrieve a context from a non-activity class?

I have found one answer that appears to say I should create a separate class and make a static MyApplication …

java android android-context
Android: BitmapFactory.decodeResource returning null

I can't seem to figure this out. I have 2 java classes with different characteristics, each calling BitmapFactory.decodeResource to get …

android graphics bitmap android-context
AsyncTask and Contexts

So I'm working out my first multi-threaded application using Android with the AsyncTask class. I'm trying to use it to …

java android android-asynctask android-context
How can I share a SharedPreferences file across two different android apps?

I've been struggling with this for a while. Basically, I want to have two applications (which will always be installed …

android android-intent sharedpreferences android-context