Issue I am beginning to develop an Android app for a Zebra MC9300 scanner and running into what I’m guessing is a configuration issue, but being new to both Zebra and Android development, I’m at a bit of a loss.
Continue readingTag: kotlin
Proper handle of variable/function according to lifecycle in jetpack compose
Issue I want to change variable value or call function according to lifecycle in jetpack compose. I tried according to this answer. Also read from the doc. I did this without any problem. I have @Composable function @Composable fun BluetoothConnectionContentStateful(
Continue readingComposable not recomposing when list is cleared in jetpack compose
Issue I have one MutableStateFlow which is kind of emptyList. When I add the item my view is recomposed without any problem. Now I want to recompose view when list is clear. I tried some piece of code but nothing
Continue readingMaking private constructor and creating secondary constructor gives error in kotlin
Issue Below code snippet gives error. Can someone guide why this is happening? class Test() private constructor { constructor(name: String): this() { println("test called constructor $name") } } fun main() { Test("hk") } Removing private constructor , this is working.
Continue readingHow to return columnScope/RowScope through lamda in jetpack compose
Issue I want to know how can we return Column/Row through lamda function in jetpack compose. I tried something but it giving me error. PairContent @Composable fun PairContent( bluetoothEnable: (ColumnScope) -> Unit, ) { AnimatedVisibility(visible = true) { Scaffold {
Continue readingJetpack recomposition behavior
Issue When state changes recomposition should fire. In code sample one state changes but recomposition doesn’t fire but in code sample two state changes onButtonClick and recomposition fires. How to make code sample one to recompose on state change? Below
Continue readingsetState is not updating the UI even though the variable isn't declared in the build method
Issue The setState function isn’t updating the text in the List even though the variable isn’t declared in the build method. I’m trying to make the text change in the first and second tab of the bottomNavigationBar. Here is the
Continue readingwhen using Navigation got error "skipped x frames! The application may be doing too much work on its main thread."
Issue I/Choreographer: Skipped 204 frames! The application may be doing too much work on its main thread. i saw some same questions here but none of them seems helping in my case I’m trying to build a music streaming app,
Continue readingHow is defined MediaRecorder( )?
Issue i make program for record audio for android but i find MediaRecorder() Deprecated kotlin code package noteapp.notesnotesnotescairo.mynoteapp import android.Manifest import android.annotation.SuppressLint import android.app.Activity import android.content.Context import android.content.pm.PackageManager import android.icu.text.SimpleDateFormat import android.media.MediaRecorder import android.os.Build import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.os.Looper
Continue readingMerge objects in an array based on key values
Issue I have an array of objects whose ID is same but it contains the list of items which I want to merge in the same item. Below is the object I want the items of which to be merged
Continue reading