Category "android"

How to pass runtime parameters to a ViewModel's constructor when using Hilt for dependency injection?

I'm wondering how to pass runtime parameters to a ViewModel's constructor while using Hilt for DI? Prior to using Hilt, I have a ViewModel that looks like this:

How to handle Fragment to not load again when coming from another fragment in Navigation Component in Android?

Scenario: I have 2 fragments ProductList and ProductDetail in my nav graph. And when i click on any product it opens the ProductDetail fragment using findNavCon

I am unable to use auto Image slider but not able to do so

I just wanted to use Auto image Slider, but after adding all the dependencies and other requirments like jitpack.io still I am unable to use sliderLayout of aut

Invalid radius value in BlurMask Ffmpeg

I'm using boxblur filter to blur specific area of video using cropping library, when i fire command sometimes it works well but sometimes it's showing me error.

The flutter app doesn't run with java.lang.AssertionError

An exception has occurred in the compiler (1.8.0_242-release). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.jav

Why not firebase fields not getting updated?

I am trying to update my firebase database based on "aadhar" field but I am failing to do it so. I don't know where it is going wrong. Here is my activity code

Google support Map crashing

Google SupportMapFragment is crashing when executing this ( (SupportMapFragment)getChildFragmentManager().findFragmentById( R.id.map)).getMapAsync

how to specify to not allow any data backup with android:dataExtractionRules and

My current android application targets 12 and higher. I do not want to allow backup of any type and currently have these manifest settings android:allowBack

CallLog.Calls.CACHED_LOOKUP_URI not working on Xiaomi/MIUI devices

I need to get the contact URI given the Call Log in order to be able to open the native "Contacts" app to show the info of the Contact that made a call, if any.

Error: Member not found: 'packageRoot', how to solve ignore: deprecated_member_use in Flutter?

In my flutter project, I have made some updates of plugins and then used flutter upgrade. After that, whenever I am running my flutter project it is showing fol

Android Studio: Logcat vs Run

What's the difference between Logcat and Run in Android-Studio? Logcat has filter-options. Beside that I don't get which specific purpose each serve. In how far

"Unable to find method ''void org.apache.commons.compress.archivers.zip.ZipFile.<init>(java.nio.channels.SeekableByteChannel)''"

The problem: I'm currently using Android Studio and Gradle to compile code from a github repository (00-Evan/shattered-pixel-dungeon) and while I can run some t

jetpack compose: @Preview is unresolved after updating to alpha08

I updated compose libraries from alpha07 to alpha08 version = "1.0.0-alpha08" androidx.compose.ui:ui:$version androidx.ui:ui-tooling:$version But after that an

Can you UnitTest Android workers that employ Hilt constructor injection

Im investigating the use of Hilt in my current Android application. api 'androidx.hilt:hilt-work:1.0.0-alpha02' implementation "com.google.dagger:hilt-android:2

Right place to map to Domain in Android clean architecture

Me and my colleague are having a debate as to where would be the right place to map our entity objects or remote dto objects to plain simple domain objects. Our

How to add a drawable image in a map marker

I want to add an image into my map marker, I don't know why this code is not working. The marker is not displaying in my current location. Here is the code. @O

VibratorManager on Wear OS 3 and Android Chipmunk 2021.2.1 Beta

val context = ApplicationProvider.getApplicationContext<Application>() val vibratorManager = context?.getSystemService(Context.VIBRATOR_MANAGER_SE

Push notification doesn't pop up on Android

I am creating flutter application using FCM for sending push notifications. I am sending notifications with Cloud Functions from website by sending JSON to devi

Detect Adapter onclick Listener method in activity using Entrypoints Dagger hilt

I need a help to detect adapter onclick event in activity class with the help of dagger hilt. Step1 : I have created one interface class which name is ItemClick

Android ViewModel - "by activityViewModels" called before "by viewModels"

After some time away from android development I'm trying to start again with a simple project. I've created a new project picking the "basic activity" option wh