Top "Android-context" questions

Interface to global information about an application environment

getting context in AsyncTask

I am trying to get the context in my AsyncTask of the class called Opciones(this class is the only …

android android-asynctask toast android-context
How to get Context in Android MVVM ViewModel

I am trying to implement MVVM pattern in my android app. I have read that ViewModels should contain no android …

android mvvm dagger-2 android-context
Android: ProgressDialog doesn't show

I'm trying to create a ProgressDialog for an Android-App (just a simple one showing the user that stuff is happening, …

android progressdialog android-context
Close the current activity when you only have a reference to Context

If I have a reference to Context, is it possible to finish the current activity? I don't have the reference …

android android-activity android-context
Bluetooth device discovery in Android -- startDiscovery()

Goal: Build an Android app that discovers the names and addresses of BT devices within range and submits their values …

android android-intent bluetooth android-adapter android-context
Needing Context in non-Activity classes

I have some classes within my application that need to call Android functions that require the Context as a parameter. …

android android-context
Getting the android context in an adapter

In many of the code samples that I find on the internet the context is obtained in the constructor of …

android android-adapter android-context
difference and when to use getApplication(), getApplicationContext(), getBaseContext() and someClass.this

I'm new to android and I'm trying to understand the difference between getApplication(), getApplicationContext(), getBaseContext(), getContext() and someClass.this and …

android android-intent this toast android-context
getApplicationContext(), getBaseContext(), getApplication(), getParent()

What is the difference between: getApplicationContext() getBasecontext() getApplication() getParent() Can you elaborate with one simple example?

android android-context
Getting the Application Context

This might be a simple question but I just wanted to make sure I am right. In my android application …

android android-activity service android-context