Category "kotlin"

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)

Android APP crashes while Loading the ads

I am trying to make a social media application. I am trying to insert ads in between the posts. In the below code when running app crashes while executing the a

How do I reduce the size of a photo when uploading a photo to Firebase storage?

I want to reduce the size of the photo when uploading photos to Firebase storage. There is an error in my codes. I wrote a method for sizing. Can you help? (kot

Is there difference between `Class.newInstance()` and `Class()` in Kotlin?

Is there a any functional difference in Kotlin between those? class Foo { companion object { fun newInstance() = Foo() } } // Create new instance s

Automatic call Picker android kotlin

How can I create an app that can take incoming calls automatically in kotlin android 10 and above anybody I have tried using the BroadcastReceiver() class but i

what's difference between ModalBottomSheetLayout and BottomSheetScaffold in compose?

Simple question, what's difference between ModalBottomSheetLayout and BottomSheetScaffold in compose? if they both do the same things so what's the difference ?

How do I persist authentication state in my Kotlin firebase app?

I am building a kotlin app using FirebaseAuth and I want to add some custom rules to keep the user signed in for a time even if they are not using the app. All