Category "kotlin"

StorageException has occurred. User is not authenticated

The error is risen when I try to upload to the storage. I've already implemented authentication in my app, and am having no problem with creating a user and aut

Barcode Scanner - (Data Wedge) TC26 device reads data twice in EditText

I am working on a barcode scanner using DataWedge API's for TC26 device. I can see sometimes the value in EditTextBox the value is shown twice randomly. For exa

kaptGenerateStubsDebugKotlin fails on a Apple M1 Macbook (JDK 11)

I get this failure both in Android Studio and running ./gradlew assembleDebug on the command line on a new Macbook with Apple M1 Max chip. On my old Intel Mac t

Assign variable a value oustide a listener in Kotlin [duplicate]

I'm kinda new to Kotlin and Firebase. I have this problem and I can't figure out why it happens. I'm trying to get the Firebase Cloud Firest

Live data observer triggered twice on fragment created

The issue that I have is not actually bug or big problem. And all works as it should, but nevertheless it annoys me. In Fragment pbserver: viewModel.pageNumbers

Regular expression to match pattern and text afterwards until that pattern occurs again, then repeat

I'm trying to write a regex for my Kotlin/JVM program that satisfies: Given this line of text {#FF00FF}test1{#112233}{placeholder} test2 It should match: Match

Data retrieving from Database Crashes when in MVVM with the Error Could not Connect To Firestore

I am trying to call data from Firebase and map it to data class while using MVVM but Its showing me errors saying failed to Connect The code of Repository Imple

Activity Intent sometimes has null extra

I'm seeing a problem where an Activity crashes grabbing an Intent extra due to it being null despite not being able to identify anywhere we don't pass that extr

How do I load an item from API to a fragment inside an Activity?

I need to load elements from my API to a fragment inside an activity, but once I initialize the element inside of the Activity Class present in the fragment lik

Profile Pic not displaying on Card View in Andorid Studio Kotlin

I am trying to get a users profile pic to be displayed beside their booking on a card in my recyclerview. The profile pic is displaying in my nav drawer, a defa

how to show back press button in a fragment

yes there are a lot of results about it i tried but i couldn't find the right answer. I have a navigation graph team. I have an activity and Four Fragments. I w

Kotlin - The feature "unit conversion" is disabled

I am still a relative newbie at Kotlin and, after a fair bit of digging, cant fix what looks to be a simple problem. For the code below the compiler returns: T

TextView and data structures with practically unlimited capacity?

I need a TextView-like widget that is able to show file contents of arbitrary size. Android default TextView can hold and display 2^31 characters, which is just

How can create merge adapter class in android kotlin

How can create merge adapter class in android Kotlin i have two class one class contain header other class contain image card how can create merge adapter class

How can create merge adapter class in android kotlin

How can create merge adapter class in android Kotlin i have two class one class contain header other class contain image card how can create merge adapter class

I'm getting jetified-kotlin-reflect error while getting the release of the app in android kotlin

app:minifyReleaseWithR8 throws an error when it comes here. There is no error when minify is false. This error. Type kotlin.reflect.jvm.internal.impl.serializat

Fixing green YUYV frame format being streamed using OpenGlView

I am using a library to do RTMP streaming from an USB/UVC camera in android. The library I am using is this one. This library works just fine for android USB ca

downloadUrl give empty result

I have a function to upload some data to firebase like this private fun addDatatoFirebase(){ val addImage = StorageRef.child(preferences.getValue("username"

Android Koin injected viewmodel with multiple same class parameters fails

I'm following the docs as stated her https://insert-koin.io/docs/reference/koin-android/viewmodel/#viewmodel-and-injection-parameters The only difference is my

Kotlin - Conditional method name with same parameters (mitigation of code duplication)

Let's consider this code examples in Kotlin: if (isFooBar) method1(arg1, arg2, arg3) else method2(arg1, arg2, arg3) // Or larger example when(enumBar)