Category "kotlin"

How to fix ERROR: No signature of method: build_ap86oam3dut3pxce3x49rdtma.android()?

ERROR: No signature of method: build_ap86oam3dut3pxce3x49rdtma.android() is applicable for argument types: (build_ap86oam3dut3pxce3x49rdtma$_run_closure1) value

How to map Elasticsearch Spring Data AggregationsContainer contents to custom model?

I am using Elsaticsearch Spring Data. I have a custom repository that uses ElasticsearchOperations based on examples on docs. I need some aggregation query resu

how to make gpx file in android

I wanna write gpx file with DOM and Transformer My code is like that try { val document = DocumentBuilderFactory.newInstance().newDocumentBuilder().

Can't configure the Android Spellchecker service to simply validate if string is a valid word or not

I am building a Flutter app that requires that I validate if a string is a valid word. The user is not inputting text, he is using elements to build the word. S

detached entity passed to persist - on findByMethod

I understand the error message and i know how to solve it, but i want to know why it occurs in this specific place especially on a find method. I created a mini

In Android Navigation Architecture, how can I check if current Fragment is the last one?

I need to display custom AlertDialog, but only when there are no more fragments after calling NavController.navigateUp(). My current code does something similar

Full screen notifications unwantedly triggering keyguard

I'm making an app that shows full-screen notifications when the device is locked. Expected behavior: when a notification is launched, the activity shows over th

Retrofit call in Kotlin Coroutines viewModelScope

Recently I've updated my ViewModel to use new viewModelScope. From its implementation, I see that Dispatchers.Main.immediate is set as the default CoroutineDisp

Retrofit call in Kotlin Coroutines viewModelScope

Recently I've updated my ViewModel to use new viewModelScope. From its implementation, I see that Dispatchers.Main.immediate is set as the default CoroutineDisp

Data class metadata is removed with proguard / R8 for Kotlin 1.6.0

I have a package with some data classes and I'm trying to access the constructor at runtime using Kotlin reflection clazz.primaryConstructor, Everything is work

Facebook ads for kotlin

i am trying to show facebook ads on my android app written in kotlin but everytime i try to add code it shows errors, i searched everywhere but could not find a

Error while using suspend with DAO methods

I am getting a compilation error that I have described below. I have tried different solution provided on similar question like mine but neither of them worked

java.lang.IllegalStateException: view!!.findViewById(R.id.dog_image) must not be null

I am working with Android Studio and Kotlin. I am trying to create an RecyclerView and a Adapter. I obtain the following error when I try to use the RecyclerVie

What is the Jetpack Compose equivalent of RecyclerView or ListView?

In Jetpack Compose, how can I display a large list of data while laying out only the visible items, instead of composing and laying out every item on the initia

Compose: remember() with keys vs. derivedStateOf()

What is the difference between these two approaches? val result = remember(key1, key2) { computeIt(key1, key2) } (Docs) val result by remember { derivedStateOf

What to send as Content

In my application, I save data to Firebase and to local storage using the Room library. With Firebase, everything is clear to me. But with Rom I had questions.

How to parse raw data in android kotlin using retrofit?

I have a webservice api which is having some raw data. No json structure data. And all i want to parse it. This is the response i am getting from an api. And h

How to return a String from a Kotlin method?

I am new to Kotlin. I am simply trying to return a response as a String from a method. But if I use val Str = ""; it is not re-assignable. Like Java in why can'

Kotlin: Iterate over components of object

Each data class object has a component for each property like component1, component2, etc.. I was wondering if there is any way in Kotlin to iterate over each c

How to skip an item in nested map based on When()

I want iterate over items's data and create a a new list of SomeData based on item.type however when type is UNKNOWN I need skip that element and not add to lis