Category "kotlin"

KOTLIN: Can I Call Multiple Class Methods Outside Apply block and Difference in Calling Methods Inside and Outside of Apply Block?

package com.example.learning fun main(args: Array<String>) { var person = Person("Ramu", 51, 50000F, 7.5F) person.apply{ name = "Sam"

Zebra write RFID in Android Kotlin preforming correctly with some tags but not others

I am working on a inventory management system where it's required to write asset ids (with length of maximum 17) in to an RFID tag. First the problem was that w

Setting Circular progressbar is not updating the progress

My Code is really simple and it has nothing fancy logic in it. I am just taking a value and trying to set the value. This value is coming from the a LiveData ob

Ktor - how to choose client engine for JVM platform?

We have JVM (JDK 8) and used okhttp as client engine by developers. Each time we makes a request, a new instance of client is created and closed finally. During

File pattern was reassigned to file type by 'Android' plugin. You can confirm or revert reassigning pattern

I am developing an app using Flutter 2.10.3 but I assume this issue is not related to Flutter. Since upgrading to Android Studio Bumblebee | 2021.1.1 Patch 2 I

Jetpack compose BottomNavigation - java.lang.IllegalStateException: Already attached to lifecycleOwner

When I double click the same item or if I go to each composable screen very quickly i receive an error, How do I solve this problem? I tried changing few things

Cannot call this method while RecyclerView is computing a layout or scrolling androidx.recyclerview.widget.RecyclerView

I have a recyclerview with check boxes and names, After checking the desirable checkboxes I want a list of them but the recyclerView recycles the items on scrol

How to remain on the same position after edit or delete data from nested recycler view

I have a nested recycler view that contains parent and child adapters. I am using Room DB for showing data on the recycler view. When I, add or delete data from

How to manage firebase sign-in in another class

I have 3 different Fragments to sign in. This is one of fragment to sign-in. @AndroidEntryPoint class SettingFragment : Fragment(){ lateinit var binding: Fragm

How to design this type of view in android

How to get this type of layout using StaggeredGridLayoutManager. Or I need to use some other thing? binding.allHistoryRV.run { layoutManager = Stag

Mockito+Kotlin+SpringBoot, `when` section doesn't mock, but invoke method meant to be mocked

I'm trying to modify existing test of kotlin+springboot project. Mockito.`when`(serviceA.getData(anyString())).thenReturn(data)// existing mocking Mockito.`when

How to call the system menu as in the Chrome browser to set the default browser

I have a Browser app, I need to set it as my default browser. I want to call such a system menu (as in the photo) only instead of Chrome - the name of my applic

Safari Browsers not loading videos or audio with wav file type

I have been digging into a bug with our website where videos and wav type audio files are not loading/showing up when viewed through the Safari browser. Instead

how to implement Coroutine async/await on BaseViewModel

I'm using Retrofit with Coroutine using this structure to hit the API requests in my app but at some screens I send multiple request and I want to only show dat

Androi Kotlin flow: How to call multiple task in sequence without many callback

i have 2 flow (flow1, flow2) and want to call 2 flows in sequential (flow1 then flow2) cause "flow2" depend on "flow1" result but want to implement "flow1" base

kotlin android gradle error id 'kotlin-android-extensions'

plugins { id 'com.android.application' id 'kotlin -android' id 'kotlin-android-extensions' } After updating the build.gradle file, it changed a

Material BottomNavigationView app:menu doesnt work

I'm doing everything according to the document on the developer.android.com, but I can't see the menu. I think the app:menu line is not working. When I enter th

Set Content Compose Dialog Works on Phone, but Not Tablet? - Android

I've run this through the debugger a hundred times and stepped into the setContent over and over. I can't figure out why. No errors given. Works perfectly on A

How fix remember in Jetpack Compose?

The picture shows the code and logs For some reason startDate and endDate not recreated

Google Calendar API mobile

I'm trying to add multiple events to Google Calendar, but I only can launch one event at a time. val intent = Intent(Intent.ACTION_INSERT) .setData(Ca