Category "kotlin"

Azure Service Bus Amqp token issue

I'm using Azure Service Bus, and Managed ID to authenticate to it. I'm using Kotlin and Quarkus, in an AKS environment. Now my issue is that when I deploy my co

Could not resolve com.squareup.moshi:moshi-kotlin:1.13.0

Getting this error and unable to build Gradle file. Android Studio Version : Bumblebee Latest Patch Gradle Plugin Version : 7.1.2 Gradle Version : 7.2 I already

Delay before next line on code on android SurfaceView kotlin

Hello how can I delay the next line of code after drawing because the sleep() doesn't seem to draw the bitmap with canvas take a look at this code I read somewh

How can I spoof prop values that don't belong to android.os.Build?

With the following segment of code I'm able to spoof certain build.prop parameters such as brand, manufactuer, device, product and model: data class DeviceEntri

Using Resource wrapper with multiple entities and mapper classes in clean architecture android

Let's say we have an app that is going to apply clean architecture principles. we have repositories, data sources(local & remote), multiple value objects fo

Android and Detekt: Aligning .idea CodeStyle with detekt

I have an Android project that i've set up with Detekt. I'm currently using: io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.19.0 (Root build.gradle) io.gitl

Share a queue between the mainThread and a coroutine

I am new to the coroutine concept. I'm not very confident in the code I've written. Basically I have a queue of user events that I send to my server. Adding an

I have been trying to add a chat sdk to my project

I added the cometchat sdk to my project but each time i try to run my app i get the following errors org.gradle.api.internal.artifacts.ivyservice.DefaultLenient

How to write regex to identify different date patterns of a String in android?

I receive different date patterns in APIs. Is there any way to identify the date pattern of the string received in an API so that I can format them without thro

Kotlin Coroutines Unit Testing

Im trying to test this suspend function: suspend fun <T> getResult(call: suspend () -> Response<T>): Resource<T> { val response = call()

I can draw a straight line between two points but I want to draw a route. how to do this? com.google.maps.android.compose

I'm using the free Maps SDK for Android with https://googlemaps.github.io/android-maps-compose/index.html I wanted to draw lines between two points.but Polyline

Android ZoneDateTime.withHour always sets hour to 8

So I am tring to schedule alarm at a particular time on current day using AlarmManager. To do that I am using ZoneDateTime to get current time and then updating

setAlarmClock() is not exact and system adjusts the time for it

Android documentation for setAlarmClock: Invoke an alarm at a precise time in the future. Because these alarms are highly visible to users, the system never ad

Admob Android SDK 20.x : how to init InterstitialAd?

I update my app with Admob Android SDK 20.x. In the previous versions of the SDK, it was possible to do something like this (in order to avoid to repeat the cod

RecyclerView sorting process and getting position issue

I have an activity that shows model comes from Firebase in a recyclerView. Each row has a delete button and user can delete which row he/she wants. The problem

How to show and save contact name in Android Fragment

I am a newcomer to Android development and Kotlin. I encounter a problem when I read a Android programming book. The book uses startActivityForResult() and onAc

ForgeGradle actions causing IntelliJ to crash

The gradle process fails when I tried to build or sync my Forge mod written in Kotlin with IntelliJ The way to find any output is from the logs: [ 34623] WAR

I am trying to make a smart contract transaction. My transactions never gets mined

I have a smart contract deployed. Whenever I try to perform a transaction, the transaction starts, but that's it. The transaction never actually takes place (or

Order ArrayList with Int and String in Kotlin

I have the given array val things = arrayOf<Any>("Jack", 8, 2, 6, "King", 5, 3, "Queen", "Jack"); Below is the code I have used things.set(things.indexO

How to return multimap type with 3 tables (Android Room Databases)

I am trying to do a 3 way JOIN in my query for my Android Room Database. My tables relationships are: Table1 has a 1 to 1 relationship with Table2 Table2 has a