I am using the following function in one of my activities of my app: What context should I use? Application Context: tied to the Lifecycle of an A ...
I am using the following function in one of my activities of my app: What context should I use? Application Context: tied to the Lifecycle of an A ...
would like to start TimerView() in onClick - TimerView is a text composable but the above mentioned error appears - both are marked composables Any ...
I'm trying to get mainActivity context and mapView inside my fragment, I tried to write some code but when I write this: i get this error: this ...
I created a fragment in which through editText fields I would like to insert numbers to be used as parameters in a function created in another class ( ...
I have a fragment Users which has 3 other fragments in it (tabs). For one tab ( called Friends2Fragment ) I made a recycler View and made an adapter f ...
I am trying to introduce preferences DataStore in my Android Compose app and several tutorials suggest the use of Conext for keeping the reference to ...
I was always facing this memory leak warning without paying much attention to it, but now I'm looking into how to deal with it and, as I know I should ...
I have an object with many screen related methods (I put only two as an example here) as follows: And I'm trying to initialise all dependencies (on ...
Starting from API level 33 the getPackageInfo(String, int) method of PackageManager class is deprecated. Documentation suggests to use getPackageInfo( ...
I am trying to get the package name of the app using the below code in my adapter java file. But I am getting nullpointer exception. Code: ...
I am developing android application which need auto restart when restart device for that I am using broadcast receiver with action BOOT_COMPLETED. Br ...
The following code crashes in 0.01% of app launches on a few devices [see below]. Manifest.xml According to user reviews, some crashes occur whe ...
I'm a beginner to Android development. When making a singleton in the Application Context, here is my code. I pass the application context to the in ...
I'm trying to use the vibrator service inside a Thread class but when I do so, I have an error which says "Type mismatch: inferred type is String but ...
I have a global app settings class as follows: And as you see I have a static Context variable as follows: (I use WeakReference so the IDE doesn ...
First of all, I am completefy noob to android development and I am making this project for my college where I display items in a Recycler view, each I ...
I have an app that uses a popupWindow for user chat. It is launched from a Fragment, and the supplied context is getActivity(). I will be typing in th ...
I want to display notifications that are being processed by a provider on an open gRPC stream. This is handled by notificationProvider.dart: showOv ...
I want to use this context to make a notification, but it should be called in a viewmodel that is made by hiltViewModel() function. How should I pass ...
The following is based on this post with one added function getAppContext(): But is there any difference between the context returned by getContext ...