Category "kotlin"

How to check if user is logged in and redirect them to the right screen using Jetpack Navigation

what is the best way to save user logged in state, check if they logged in or not and redirect them to the right screen. I'm not using firebase Auth in this cur

How to get the name of child realtime database kotlin

I am trying to get the email (in this case [email protected]) however I don't see any method I can use that gets me the name of the child instead of the v

Flutter: Shared Storage (Storage Access Framework API) Permission for files inside hidden sub-directory not working

How to achieve to listing all files (e.g. Media) inside hidden subdirectory i.e. folder name start with '.' e.g. "(.media)" after using SAF in Flutter/Dart? I h

Save ExoPlayer position to continue playback after closing the view (onDestroy())

As I have understood, when I exit the player view while watching a video by pressing or not the pause button, the onPause() and onStop() methods come into play

Share Intent for dynamic image in imageview without saving, using kotlin with little permissions as possible

I need to share the image in the imageView and the following code is promising (though not quite what I ) but returns some errors: Kotlin: fun shareImage (i

toBundle.toPutInt() method of NavArgs is not working

So, in Android's Navigation, when we want to pass parameters from a FragmentA to a FragmentB, we have two ways to receive this parameter, via Bundle, in Fragmen

Problem with firebase auth kotlin library version 21.0.4

When I update the com.google.firebase:firebase-auth-ktx library to a version higher than 21.0.1 I get the following warning: Kotlin library {0} was compiled wi

How to update Jetpack compose UI by override method or outside the function

I am converting my older XML UI as per requirement. in there, I am unable to update by Jetpack compose UI by my override function. In some research I see many w

Which one should I choose between collecting Flow from ViewModel or collecting Flow in Compose directly

The code A collect Flow in ViewModel, and convert a Flow as hot Flow using MutableStateFlow, then use collectAsState() in Compose. The code B collect Flow in Co

Plugin [id: 'org.jetbrains.kotlin.android', version: '1.6.21', apply: false] was not found in any of the following sources:

I started learning Kotlin in Android studio a few days ago and I still haven't figured it all out, so having this problem is a big question mark for me, I know

Flow Debounce for several types

I have a screen with several switchcompats like on photo. And I want to collect only last input of each of them to send it to server. I use SharedFlow. Now I ta

ClassCastException while trying to use com.google.api.client.http.HttpTransport

Basically, I can't find an implementation of com.google.api.client.http.HttpTransport that works in Android SDK 31. I'm trying to get started with the google-si

java.util.NoSuchElementException: Flow is empty

I'm trying to test this repository using a unit test with JUnit 4 class AppRepository @Inject constructor( private val networkHelper: NetworkHelper, pri

how do I wait for a response from FireBase Kotlin Android Studio

Screenshot-1 Screenshot-2 I am trying to check in the database whether there is a user with such a login or not. If it exists, then display an error.How can I g

How can I set the background colour of views according to theme?

How can I set the background colour of views according to theme? For example, in light theme a background colour of a view can be a light shade of gray, but in

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