Category "kotlin"

How to increase capture default camera image quality

I am using default camera and capturing image. we have converted Base64 image after converting image quality is blur and image size getting very low below 50kb.

org.kodein.di.Kodein$NotFoundException: No binding found for bind<LLApi>() with ?<LoginFragment>().? { ? }

Iam doing a project with objectbox + retrofit + kodein. But I'm getting this error. org.kodein.di.Kodein$NotFoundException: No binding found for bind<LLApi&g

Android app crash okhttp3 HTTP FAILED: javax.net.ssl.SSLException: Read error: I/O error during system call, Software caused connection abort

I am working on android native kotlin project. I am testing app in android real Oneplus 6 device with Android version 10. Please find below details from build.

Command execution in kotlin

I want to execute this command: Runtime.getRuntime().exec("adb shell dpm set-device-owner com.example.msgshareapp/.AdminReceiver") This didn't work,

TomTom Map api black dots on the map

I am using the TomTom map API. But when I'm using the map there are so many black dots and boxes(as seen on the image below). When I zoom in the dots and boxes

How to manually update a kotlin flow

I'm trying to update the source of a Flow in Kotlin and I'm not sure if this is the right approach and if it's possible with Flow at all. I have a database cont

JSON Serialization / Deserialization Kotlin Android Jetpack Compose Table

I'm in the process of creating a table section in Jetpack Compose that deserializes the data from a JSON. At this point, I'm simply trying to display the data (

android camera2 Api autoflash not working properly, the first picture is taken before the flash fires

I'm using camera 2 API, my project is heavily based on the archived project from google: https://github.com/googlearchive/android-Camera2Basic/ I'm starting the

Jetpack Compose take screenshot of composable function?

I want to take screenshot of specific composable function on Jetpack Compose. How can I do this? Please, anyone help me. I want to take screenshot of composable

How to Unsubscribe from coroutine flows right after RoomDb call

I'm trying to query Room database(action 1) and then based on the returned results perform another action on the same table. however I noticed that every time I

Cancel viewModelScope and re-use it later on

I'm using Coroutines for dealing with async jobs: viewModelScope.launch { val userResponse = getUsers() //suspendable function } What I want to do is stop

Kotlin Android Studio: org.junit.ComparisonFailure with NBSP

I have this code @Test fun price_twelve_cupcakes() { val viewModel = OrderViewModel() viewModel.setQuantity(12) viewModel.price.observeForever {}

Downloadable Font's font weight not working android

I was following this official guide and wanted to use Poppins font for my project. The font has changed but the font weight property does not seem to be work. I

How to remove padding between AlertDialog and title/text with Compose

Using compose, I want to create something like this : Problem is using compose AlertDialog I only achieve to get this : There is a padding between the AlertDi

How to remove padding between AlertDialog and title/text with Compose

Using compose, I want to create something like this : Problem is using compose AlertDialog I only achieve to get this : There is a padding between the AlertDi

What is the better or easier way to create "nested" menus in Jetpack Compose?

So in XML you were able to structure menu items and nest them like this. But in jetpack compose, I am unable to figure out how this would work. I already read

How to call suspend function from Service Android?

How to provide scope or how to call suspend function from Service Android? Usually, activity or viewmodel provides us the scope, from where we can launch suspen

RealmDB and diacritical letters problem with upper and lower case

I have project where I use RealmDB. When I use search feature with normal string(letters) it work well - upper/lower letters are in mode Case.INSENSITIVE, but i

How to update the recyclerview when opening the app?

I'm looking for a list of movies in an API, the project is in MVVM and the search is being done perfectly. However, when opening the app, the user has to exit a

Kotlin read from room database in fragment

I write an application with room database and I have a problem with reading data and use it in the mine thread. consider tables as those: Table1 | ID | Name |