Category "android"

My android app keeps crashing from which seems to be a permission problem despite granting the relevant permission in the Manifest

Below is the MainActivity code from which the problem is arising from. class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelectedListene

Change switch color programmatically in Android Studio using Kotlin

I am trying to add a color to the switches in Android Studio using Kotlin I tried few answers fronm this forum and couldn't get it to work Is it possible to mak

How to update listview in Fragment with custom adapter

I am giving product id with barcode scanner. I can add product to listView but when i try to increase or decrease amount of the product. It doesn't update UI. I

How to build an .aab using Buildozer via Docker?

I have just seen that support for AAB files have just been introduced in Python for Android (p4a). Considering that, fom August 2021, new apps are required to p

Invariant Violation: requireNativeComponent: "BVLinearGradient"

I have been working with the react-native-gradient and I am getting the following error regarding the package. Error Invariant Violation: requireNativeComponent

How can I use a virtual audio sink on an android emulator in headless mode? Getting pulseaudio init error when launching emulator

I have a virtual sink on my host machine. pulseaudio is running as a system wide daemon. When trying to launch an emulator with the follow command: emulator -av

Android - How to get canvas object from my view?

My app uses a tensorflow lite model to detect objects from an uploaded image . Therefore I need to draw the bounding boxes of the object on the image that the u

Maven api pulish with Gradle 7.2

I want to publish an Android in jitpack.io but api dependencies are missing, that's why I use with Gradle 7.2 this project.afterEvaluate { publishing {

OneTimeWorkRequest (content observer) loses first picture after app is closed. Works OK for subsequent pictures

I am trying to implement reliable background listener on user media (e.g. if user takes a picture, I want to capture that, even if application is closed). I am

Usecase inside a custom view

First of all, sorry for my english, this is google translator. I am learning mvvm, maybe I have some misconception but I think I can understand it well. My goal

Add the edit data function in recycler view using interfaces

My code is working fine, it adds the data when refresh the page and it deletes the data on long press, but when I refresh the page duplicates the same data that

How to remove padding from Text button?

I am trying to remove padding from TextButton but it wont work. TextButton( onClick = {}, modifier = Modifier.padding(0.dp) ) { Text( " ${ge

How can I find out which parts of my code are using the UI Thread the most?

I'm trying to chase some ANRs without any stack traces. I'm at a point where I just want to review every part of my code that uses the UI thread heavily. Is the

SpannableStringBuilder only keeping formatting for the first for loop

I am trying to use a for loop to add formatting using SpannableStringBuild from strings in a list, however in the TextView, despite all the strings having been

Saving State with Bottom Navigation View

I'm currently writing an app that displays a list of movies. I'm using a bottom navigation view with 3 tabs: Trending, Discover, and Favorites. Each of these di

Android Studio Arctic Fox - projects not building after update

After updating android studio to current latest (2020.3.1.24) I'm not able to open any file/class/document inside it, run or build the project. Creating new pro

How to use .pfx certificate install in user credentials on android mobile?

One .pfx certificate was deployed on mobile with the MDM : VMWare AirWatch. I can see it in the 'Security' -> 'User credentials' sections. I made an Android

Android: Automatically modify metadata of any new file(s) saved or downloaded

Is there a way to attach a piece of custom code to the Android OS which automatically deletes all the metadata of any new file(s) saved or downloaded (e.x. owne

How to not count a swipe for a press in kotlin android studio

I'm building a game that when the user pressed in to first activity title screen it starts the game but I don't want to count a swipe as a click because the use

best way to compare images for similarity in android

how to compare two images, to know are they similar for 100%? I was getting path of all images from mediastore, then converted to bitmap and compared using bitm