Category "kotlin"

How can I save data from intent to text file to documents folder?

I am receiving an object that I want to save with timestamp to text file in the phone's documents folder. I have currently added the permissions lines to Androi

Plugin with id 'kotlin-android' not found. flutter

I am creating a project that connected to a firebase, but I think the problem not in the firebase...... I found this error when I am trying to run the project:

RuntimeException: Error in evaluationEvaluation: status: 13 value: {message=Invalid or unexpected token}

when i uploaded to google play console, and review finished. apk rejected by showing this error. how to solve this problem, anyone have a solution? FATAL EXCEPT

Plugin com.android.application not found when running app in android studio chipmunk canary 7

I had downloaded android studio chipmunk canary 7 and faces this problem : Plugin [id: 'com.android.application', version: '7.2.0-alpha07', apply: false] was n

Kotlin: How to delay code in Android without making the UI freeze

I am trying to delay code in Kotlin I have tried Thread.sleep(1000) But its freezes the UI. Does somebody know why this is happening And how to delay withou

How to inflate custom layout in Material tooltip of a Material slider in Android?

I was trying to achieve something similar to the below image by manipulating the Material tooltip inside the Material slider. I was able to achieve something s

How to run Android Apps in a computer browser like PWA App?

I would like to compare native with cross-platform technology. I am writing Kotlin Android Native application and is it possible to easily open it in browser li

How to add/remove characters inside TextField?

I have a Room database with a table that holds users. Each user has an ID and a name. My goal is to change the name of the user based on the ID. Here is what I

Java to Kotlin conversion extending Abstract class

I'm converting a Java class that extends an abstract class as per the code below public class BadRequestAlertException extends AbstractThrowableProblem {

Problems with android Compose

I am trying to work through a tutorial on android compose. It works well while I use:kotlin-gradle-plugin:1.5.31, but the android studio has updated to :kotlin-

In Flutter 3.0, the Qr Code Scanner is giving an error

I am updating an old project. This qr code scanner is giving an error.The project had previously run on flutter 2.10. There are errors in Flutter 3.0. import 'p

How to setup protobuf in kotlin/android studio?

First time using protobuf, so following googles instructions I placed all my .protos in a protos folder in my android studio project. I know the .proto files ar

Spring Boot Kotlin Mockito @MockBean dependency throws IllegalStateException null on method call

I am relatively new to Spring and Kotlin. I ran into this problem and it does not seem that there is a comprehensible (for me) explanation anywhere on the Inter

How to get position in Horizontal RecyclerView?

I'm a Kotlin's student. I'm doing a tutorial layout using RecyclerView horizontal, but I'm having an issue, already tried to find some answer on stack but didn'

Retrofit2 not working when enabling Proguard

I have an application which uses retrofit to fetch logo form an API. When i don't obfuscate and shrink my code, everything works fine. But when i enable it, th

After upgrading gradle to 4.0.0, retrofit do not receive response anymore

After upgrading from gradle 3.6.3 to 4.0.0, retrofit only able to send request but not able to receive response. From the logging I can only see: I/okhttp.OkHtt

Unit test the new Kotlin coroutine StateFlow

Recently, the class StateFlow was introduced as part of Kotlin coroutines. I'm currently trying it and encountered an issue while trying to unit test my ViewMod

Host name may not be empty

After upgrading my Android Studio, I got this error whenever I wanted to generate a signed Apk (without any detail of where the problem is). There was no proble

Unit test the new Kotlin coroutine StateFlow

Recently, the class StateFlow was introduced as part of Kotlin coroutines. I'm currently trying it and encountered an issue while trying to unit test my ViewMod

Android ExoPlayer delay when playing audio

In my app, I'm trying to use ExoPlayer to play audio and video together at the same time using MergingMediaSource. The problem is that it buffers for several mi