Category "kotlin"

Agora SDK- Is it possible to implement peer to peer (one to one) "video chat" using Agora SDK for Android?

I was wondering is there a way to implement one-to-one video chat using Agora SDK. I found lot of resources to implement the video call feature with establishin

Kotlin Cannot Inflate Layout

I am building an application that has a GridView that contains a dynamic amount of CardViews. I am having issues accessing the TextView elements in the individ

Redirect a Fragment to another Fragment

I'm studying a lot about Kotlin, and I have a single project to make. So, I have some Fragments and one Activity. All actions from left menu are working, ok. Bu

How can I do work with a coroutine in a foreground service? Kotlin Android

I am trying to build an app that will run in a foreground service and give feedback to the user only through audio. I have followed this example: https://better

embedding golang server with flutter

I have web server written in golang which uses graphql package gqlgen and gorm for database. Since golang can be compiled and run on android I wanted to create

Switching back to previous task in android

I have three activities A, B, and C. As expected when C is changed to pip (picture in picture) mode, it is separated out as a new task. When back pressed is pre

How test a ViewModel function that launch a viewModelScope coroutine? Android Kotlin

I´m trying to figure out the simplest way to test this kind on function members, I´ve seen more complex cases like Coroutines - unit testing viewMod

How to create a list from scanned BLE results

as invers to the question asked here How to convert Flow<List<Object>> to Flow<Object> I want to convert my Flow<Object> to Flow<List

SavedStateHandle kotlin always receiving null

I need a Factory to support Viewmodel WITH ARGUMENTS. I tried to implement the class which is commended "AbstractSavedStateViewModelFactory". I applied the trou

Monitor reading access to contacts ANDROID without rooting of device

There is a way to monitor reading access to contacts? I tried this experiment: I developed an application that reads contacts subsequentially i ran it. After th

Add a loading effect with progress

Often when we download something use the terminal or the command prompt, we get a progress like this: ----------10% after a while ----------------------------

How to add elevation just in the bottom of an element? Jetpack Compose

I'm trying to add some elevation or shadow just in the bottom of an element. For this element I'm using a Tab composable. How can I add this elevation/shadow ju

Can't fetch saved account from Keychain

I made a simple analog of the account manager for iOS using Apple Keychain: @Serializable data class Account( val name: String, val password: String,

ArrayList get value of another ArrayList

I have a problem with ArrayList. I have 2 ArrayList and they are dependent. class MainActivity : AppCompatActivity() { var arrayList1 = arrayListOf<Stri

How to count how many times document was downloaded in Firebase?

I have a collection in my Firestore Database with posts. Each post has some comments as a document in the collection comments in the main post document (screens

getStringExtra() not working in Adapter Class

I am trying to get the pass the current user data into the this adapter class. However, I failed to use the getStringExtra() where it keep mentions that the get

Get pixels of a recyclerView item

I'm wondering if it's possible to get the pixels of an item of a recyclerView, let's say I have an horizontal recyclerView and all the items are the same size (

Floating button doesn't seen because of Bottom Nav

On Main activity XML I have one buttom nav and on another fragment I have a floating button. This button is not visible because of the buttom nav. If I add on f

Mocking methods that call JNI with Mockk

I am trying to add unit tests to an existing Android app that has some JNI libraries (only for ARM). I am using Mockk and Junit4, and I have the following: This

Take a class as a parameter which has a particular method in it

I know that we can pass a class in a param which has a particular class as its super. For example, see this: public void sampleMethod(Class<? super MyParentC