id
stringlengths
7
11
source
stringclasses
1 value
category
stringclasses
11 values
title
stringlengths
15
214
text
stringlengths
70
30.5k
url
stringlengths
57
160
tags
stringlengths
3
113
created_at
int64
1.22B
1.79B
se_79827952
stackoverflow
MOBILE_DEVELOPMENT
How to handle errors in compose viewmodels?
How to handle errors in compose viewmodels? Imagine something like this: class FileModel: ViewModel() { private val _state: MutableStateFlow<FileState> = MutableStateFlow(initialState) val state: StateFlow<FileState> = _state.asStateFlow() fun readFile() { //read file and set state } } cl...
https://stackoverflow.com/questions/79827952/how-to-handle-errors-in-compose-viewmodels
kotlin, android-jetpack-compose, jetbrains-compose
1,763,911,713
se_71341403
stackoverflow
MOBILE_DEVELOPMENT
How can I save files downloaded from Download Manager in Android to app internal(filesDir) as now its not easy to access files in Android
How can I save files downloaded from Download Manager in Android to app internal(filesDir) as now its not easy to access files in Android Here is the code i am tring to do the same when i am downloading anything from webView in android. webview.setDownloadListener { url, userAgent, contentDisposition, mimetype, l -> ...
https://stackoverflow.com/questions/71341403/how-can-i-save-files-downloaded-from-download-manager-in-android-to-app-internal
java, android, kotlin, android-webview, android-download-manager
1,646,328,986
se_61458496
stackoverflow
MOBILE_DEVELOPMENT
Is there a cleaner way to set a top-level variable later in code without making it a lateinit var?
Is there a cleaner way to set a top-level variable later in code without making it a lateinit var? I want to have the top-level variable set some time later in the main function, but I don't want to make it a lateinit var which certainly breaks the extension property functionality. For instance, this code doesn't work...
https://stackoverflow.com/questions/61458496/is-there-a-cleaner-way-to-set-a-top-level-variable-later-in-code-without-making
kotlin, variables, coding-style, lazy-initialization, kotlin-extension
1,587,989,089
se_72866924
stackoverflow
MOBILE_DEVELOPMENT
Facebook SDK : &#39;Apps that target Android API 30+ (Android 11+) cannot call Facebook native apps unless the package visibility needs are declared&#39;
Facebook SDK : &#39;Apps that target Android API 30+ (Android 11+) cannot call Facebook native apps unless the package visibility needs are declared&#39; I use the Android Facebook SDK. I get the following message in Logcat: com.facebook.internal.NativeProtocol: Apps that target Android API 30+ (Android 11+) cannot ca...
https://stackoverflow.com/questions/72866924/facebook-sdk-apps-that-target-android-api-30-android-11-cannot-call-faceb
android, facebook, kotlin, facebook-android-sdk, facebook-sdk-4.0
1,657,012,809
se_67983095
stackoverflow
MOBILE_DEVELOPMENT
android.os.Parcel.createExceptionOrNull Fatal Exception: java.lang.IllegalArgumentException
android.os.Parcel.createExceptionOrNull Fatal Exception: java.lang.IllegalArgumentException I am getting this exception on android 11 Samsung device. This is the stack trace: at android.os.Parcel.createExceptionOrNull(Parcel.java:2389) at android.os.Parcel.createException(Parcel.java:2369) at a...
https://stackoverflow.com/questions/67983095/android-os-parcel-createexceptionornull-fatal-exception-java-lang-illegalargume
java, android, kotlin, android-11
1,623,747,349
se_79237053
stackoverflow
MOBILE_DEVELOPMENT
Android: Spotify API preview_url for tracks is suddenly being returned as null
Android: Spotify API preview_url for tracks is suddenly being returned as null I'm using the Spotify API copyright free 30 sec preview of songs in my app, and suddenly it stopped working and all tracks returned have a null preview_url. I tried specifying different markets -like "US" and "ES"- in the query to no avail,...
https://stackoverflow.com/questions/79237053/android-spotify-api-preview-url-for-tracks-is-suddenly-being-returned-as-null
android, kotlin, spotify
1,732,882,163
se_71504859
stackoverflow
MOBILE_DEVELOPMENT
My app works on emulator but crashes on device on startup
My app works on emulator but crashes on device on startup In my android dev in kotlin course, I create a simple to do list, the list seems perfectly fine, no error in coding everything is fixed I run the app on my emulator and it works perfectly fine, but when I run and test it it through my device through usb connect...
https://stackoverflow.com/questions/71504859/my-app-works-on-emulator-but-crashes-on-device-on-startup
android, android-studio, kotlin, logcat
1,647,469,000
se_79826622
stackoverflow
MOBILE_DEVELOPMENT
Latest version of Compose Maps dependency throws &quot;IllegalArgumentException: source must not be null&quot;
Latest version of Compose Maps dependency throws &quot;IllegalArgumentException: source must not be null&quot; When using com.google.maps.android:maps-compose in version 6.12.2 I get the following error building the project: org.jetbrains.kotlin.util.FileAnalysisException: While analysing <redacted>/MainActivity.kt:17...
https://stackoverflow.com/questions/79826622/latest-version-of-compose-maps-dependency-throws-illegalargumentexception-sour
android, kotlin, google-maps, android-jetpack-compose
1,763,736,244
se_68300051
stackoverflow
MOBILE_DEVELOPMENT
KMM Application Cannot Run In Simulator
KMM Application Cannot Run In Simulator I am new to KMM and I am trying to integrate KMM project as a pod to my sample Xcode Project. I can link the KMM Pod to my Xcode project. However if I try to call one of the function, below error yielded. If I do not call any of the KMM function, it can run the app in my simulat...
https://stackoverflow.com/questions/68300051/kmm-application-cannot-run-in-simulator
ios, kotlin, kotlin-multiplatform, kmm
1,625,740,759
se_79826381
stackoverflow
MOBILE_DEVELOPMENT
Spring Data Elasticsearch adds new Date field as text in existing index mapping
Spring Data Elasticsearch adds new Date field as text in existing index mapping I'm using Kotlin + Spring Boot 3.4.1 with spring-boot-starter-data-elasticsearch and Elasticsearch 8.12.2. Existing document: @Document(indexName = "crashes_summary") data class CrashSummary( @Id val id: String? = null, val issueId...
https://stackoverflow.com/questions/79826381/spring-data-elasticsearch-adds-new-date-field-as-text-in-existing-index-mapping
spring-boot, kotlin, elasticsearch
1,763,720,096
se_79825753
stackoverflow
MOBILE_DEVELOPMENT
Difference in Double representation between Kotlin and Swift
Difference in Double representation between Kotlin and Swift In Kotlin, if you do println(String.format("%.17f", 10.45)), you will see 10.45000000000000000 in the output. In Swift, if you do print(String(format: "%.17f", 10.45)) you will see 10.449999... I'm just wondering why there's this difference. In the docs for ...
https://stackoverflow.com/questions/79825753/difference-in-double-representation-between-kotlin-and-swift
swift, kotlin, floating-point
1,763,657,438
se_79510578
stackoverflow
MOBILE_DEVELOPMENT
Android Media3 MediaSessionService does not produce a notification
Android Media3 MediaSessionService does not produce a notification As Android documentation says: A MediaSessionService will automatically create a MediaStyle notification for you in the form of a MediaNotification. So I implemented a minimal MediaSessionService which supports "playing" a song and retrieving its met...
https://stackoverflow.com/questions/79510578/android-media3-mediasessionservice-does-not-produce-a-notification
android, kotlin, android-mediasession, android-media3
1,742,008,210
se_79150841
stackoverflow
MOBILE_DEVELOPMENT
Android, Kotlin, Google Maps Markers
Android, Kotlin, Google Maps Markers I am trying develop an Android App with Kotlin in Android Studio. I want to make markers for Pharmacy in my app in Google Maps. My question is in my code: private fun searchNearbyPharmacies(location: LatLng) { val placeFields = listOf(Place.Field.DISPLAY_NAME, Place.Field.LOCA...
https://stackoverflow.com/questions/79150841/android-kotlin-google-maps-markers
android, kotlin, google-maps, google-maps-android-api-2
1,730,556,707
se_79823691
stackoverflow
MOBILE_DEVELOPMENT
Kotlin script - can&#39;t run if full path contains space
Kotlin script - can&#39;t run if full path contains space Kotlin compiler is located in C:\kotlinc\bin, when trying to run any script that is located in a path with space - it fails with message InvalidPathException: Illegal char <:> at index 2: /H:/My%20Drive/... Doesn't matter if I use relative path, just file name...
https://stackoverflow.com/questions/79823691/kotlin-script-cant-run-if-full-path-contains-space
windows, powershell, kotlin
1,763,489,102
se_60229555
stackoverflow
MOBILE_DEVELOPMENT
Adding gif into Jetpack Compose
Adding gif into Jetpack Compose I have a gif that I would like to place into my app. I know how to insert image resources, but when I try adding the gif it becomes a static image. DrawImage(image = +imageResource(R.drawable.gif)) Has anyone tried adding a gif into Jetpack Compose, as struggling to find docs online ...
https://stackoverflow.com/questions/60229555/adding-gif-into-jetpack-compose
android, kotlin, gif, android-jetpack, android-jetpack-compose
1,581,695,493
se_78288599
stackoverflow
MOBILE_DEVELOPMENT
How to add a custom Font to Itext7 library in jetpack Compose
How to add a custom Font to Itext7 library in jetpack Compose I want to build android app that generates pdf file, but I want to add custom font that's suitable with app purpose. I tried to use string path "src/main/...etc" but it didn't work Reading IText7 documentation was really painful, any solution?
https://stackoverflow.com/questions/78288599/how-to-add-a-custom-font-to-itext7-library-in-jetpack-compose
kotlin, android-jetpack-compose, itext7
1,712,509,062
se_79824943
stackoverflow
MOBILE_DEVELOPMENT
Why is the getOrElse() function of arrow-kt returning Any?
Why is the getOrElse() function of arrow-kt returning Any? I am trying to understand the getOrElse() function of arrow-kt. I want to create a simple function that takes a list of strings, filters them, and returns the first matching value as an Option<String>. I created the following trivial example: fun filterStrings...
https://stackoverflow.com/questions/79824943/why-is-the-getorelse-function-of-arrow-kt-returning-any
kotlin, option-type, arrow-kt
1,763,587,958
se_70807891
stackoverflow
MOBILE_DEVELOPMENT
&#39;BaseVariant&#39; is deprecated, what is the alternative of BaseVariant?
&#39;BaseVariant&#39; is deprecated, what is the alternative of BaseVariant? 'BaseVariant' has been deprecated. I am using BaseVariant like this import com.android.build.gradle.api.BaseVariant var bundleForVariant: (BaseVariant) -> Boolean = { variant -> if (bundleIn.getting(variant.name).isPresent) bundleIn....
https://stackoverflow.com/questions/70807891/basevariant-is-deprecated-what-is-the-alternative-of-basevariant
android, kotlin, gradle
1,642,801,169
se_77053797
stackoverflow
MOBILE_DEVELOPMENT
Java virtual threads vs Kotlin coroutines
Java virtual threads vs Kotlin coroutines How do Java 21 virtual threads compare to Kotlin coroutines? When coding in Kotlin, is it better to prefer one over the other? This video: Java 21 new feature: Virtual Threads #RoadTo21 seems to frown upon using virtual threads for non-IO or non-blocking tasks. I create corout...
https://stackoverflow.com/questions/77053797/java-virtual-threads-vs-kotlin-coroutines
java, kotlin, concurrency, kotlin-coroutines, virtual-threads
1,694,017,779
se_56325366
stackoverflow
MOBILE_DEVELOPMENT
How to partition and typecast a List in Kotlin
How to partition and typecast a List in Kotlin In Kotlin I can: val (specificMembers, regularMembers) = members.partition {it is SpecificMember} However to my knowledge I can not do something like: val (specificMembers as List<SpecificMember>, regularMembers) = members.partition {it is SpecificMember} My questio...
https://stackoverflow.com/questions/56325366/how-to-partition-and-typecast-a-list-in-kotlin
kotlin, casting, partitioning
1,558,957,289
se_79820340
stackoverflow
MOBILE_DEVELOPMENT
Twilio Voice React Native — App Crashes When Initiating Outgoing Call (`getMainActivityClass()` Returns Null)
Twilio Voice React Native — App Crashes When Initiating Outgoing Call (`getMainActivityClass()` Returns Null) After resolving a startup crash, I’m now facing a new crash when attempting to initiate an outgoing call using @twilio/voice-react-native-sdk. When I call: Voice.connect(...) the app crashes with the followin...
https://stackoverflow.com/questions/79820340/twilio-voice-react-native-app-crashes-when-initiating-outgoing-call-getmaina
java, android, react-native, kotlin, twilio
1,763,144,743
se_79821158
stackoverflow
MOBILE_DEVELOPMENT
LinearProgressIndicator displays wrong progress when its size is modified
LinearProgressIndicator displays wrong progress when its size is modified I'm having trouble with the progress indication of the LinearProgressIndicator when its height is increased: The progress is very small (1%), but the second LinearProgressIndicator shows a much larger progress than that. This is my code: val pr...
https://stackoverflow.com/questions/79821158/linearprogressindicator-displays-wrong-progress-when-its-size-is-modified
kotlin, android-jetpack-compose
1,763,243,960
se_79822583
stackoverflow
MOBILE_DEVELOPMENT
Prevent multiple subscriptions of same topic in HiveMQ MQTT client
Prevent multiple subscriptions of same topic in HiveMQ MQTT client I'm struggling with my MQTT clients to subscribe to a topic without having the topic subscribed multiple times after the client runs for a while. (I also have an issue with the clients not processing incoming messages on some topics any longer after th...
https://stackoverflow.com/questions/79822583/prevent-multiple-subscriptions-of-same-topic-in-hivemq-mqtt-client
java, kotlin, mqtt, hivemq
1,763,399,876
se_53138172
stackoverflow
MOBILE_DEVELOPMENT
How to implement switch-case statement in Kotlin
How to implement switch-case statement in Kotlin How to implement equivalent of following Java switch statement code in Kotlin? switch (5) { case 1: // Do code break; case 2: // Do code break; case 3: // Do code break; }
https://stackoverflow.com/questions/53138172/how-to-implement-switch-case-statement-in-kotlin
kotlin, switch-statement
1,541,311,138
se_72514669
stackoverflow
MOBILE_DEVELOPMENT
Why is the key type parameter of a Kotlin Map invariant?
Why is the key type parameter of a Kotlin Map invariant? The Map interface in Kotlin (using V1.6.21) has a signature of interface Map<K, out V> Why is K invariant instead of covariant (out K)? The documentation of type parameter K says: The map is invariant in its key type, as it can accept key as a parameter (of con...
https://stackoverflow.com/questions/72514669/why-is-the-key-type-parameter-of-a-kotlin-map-invariant
kotlin, generics, collections, covariance
1,654,502,260
se_79823159
stackoverflow
MOBILE_DEVELOPMENT
Spring Webflux Dynamic path control in the filter layer
Spring Webflux Dynamic path control in the filter layer in my Spring WebFlux project, I cache endpoints with specific annotations at application startup time using the following DTO. data class ExplorerResult<T>( override val supportedPaths: Set<PathPattern>, override val supportedMethods: Set<RequestMethod>, ...
https://stackoverflow.com/questions/79823159/spring-webflux-dynamic-path-control-in-the-filter-layer
spring-boot, kotlin, spring-webflux
1,763,456,115
se_57303391
stackoverflow
MOBILE_DEVELOPMENT
How do I resolve a Redeclaration Error in Android Studio
How do I resolve a Redeclaration Error in Android Studio This code is for a button that would be on the android emulator. However, when I place this code in the main activity.kt it gives me multiple errors. The first error I experience is a redeclaration error on line 9 on the main activity package com.example.andro...
https://stackoverflow.com/questions/57303391/how-do-i-resolve-a-redeclaration-error-in-android-studio
java, android, kotlin
1,564,642,683
se_74729614
stackoverflow
MOBILE_DEVELOPMENT
how to encrypt using a private key
how to encrypt using a private key I have a Private key file that looks like this -----BEGIN PRIVATE KEY----- [content] -----END PRIVATE KEY----- i want to encrypt String data using this key i am trying like this : fun encryptData(txt: String, pk: String): String { var encoded = "" var encrypted: ByteArray? = ...
https://stackoverflow.com/questions/74729614/how-to-encrypt-using-a-private-key
android, kotlin, encryption, cryptography, retrofit
1,670,499,007
se_45173677
stackoverflow
MOBILE_DEVELOPMENT
Invoke Operator &amp; Operator Overloading in Kotlin
Invoke Operator &amp; Operator Overloading in Kotlin I get to know about the Invoke operator that, a() is equivalent to a.invoke() Is there anything more regarding Invoke operator than please explain. Also, I did not get any example of Invoke operator overloading. Is Invoke operator overloading possible? If possible t...
https://stackoverflow.com/questions/45173677/invoke-operator-operator-overloading-in-kotlin
operator-overloading, kotlin
1,500,399,694
se_79822816
stackoverflow
MOBILE_DEVELOPMENT
How to keep a specific LazyColumn item visible when the keyboard opens?
How to keep a specific LazyColumn item visible when the keyboard opens? I have a bottom sheet used for search, and it has two UI states. Both states share the same LazyColumn. State 1: LazyColumn { item { Row { ... } } // search categories item { Text(text = "Empty history") } } State 2: LazyColumn { it...
https://stackoverflow.com/questions/79822816/how-to-keep-a-specific-lazycolumn-item-visible-when-the-keyboard-opens
android, kotlin, android-jetpack-compose
1,763,416,534
se_79783882
stackoverflow
MOBILE_DEVELOPMENT
Android 35+ Navigation Bar Changes Color During Activity Change
Android 35+ Navigation Bar Changes Color During Activity Change I noticed very weird behaviour regarding colors in my app. During changing Activity from Activity1 to Activity2 navigation bar changes its color (to black one if it matters) during transition. After this transition it returns to a correct color. Of course...
https://stackoverflow.com/questions/79783882/android-35-navigation-bar-changes-color-during-activity-change
android, kotlin, gradle, navigationbar, android-navigation-bar
1,759,767,911
se_79815464
stackoverflow
MOBILE_DEVELOPMENT
Wrap function result in Mono.defer
Wrap function result in Mono.defer In which cases does it make sense to wrap the result of a function that returns a Mono in Mono.defer, when assigning it to a variable and using it later? F.e. fun getMono(): Mono<Int> // some business logic val result = getMono() // my logic val otherResult = result.flatMap{...}.th...
https://stackoverflow.com/questions/79815464/wrap-function-result-in-mono-defer
kotlin, spring-webflux, project-reactor, best-practices
1,762,769,443
se_79821075
stackoverflow
MOBILE_DEVELOPMENT
How to make a custom notification full-width?
How to make a custom notification full-width? I'm trying to create a full-width custom notification for my Flutter app on Android. The problem is that the notification always appears centered with large horizontal margins, even though my layout uses match_parent for the width. I'm calling native Kotlin through a Metho...
https://stackoverflow.com/questions/79821075/how-to-make-a-custom-notification-full-width
android, xml, flutter, kotlin, mobile
1,763,235,411
se_79820918
stackoverflow
MOBILE_DEVELOPMENT
How to load SVG content images(not url) using Coil on Android
How to load SVG content images(not url) using Coil on Android For example, the SVG content obtained from the web is: <svg t="1717950268208" class="icon" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="32569" width="200" height="200"><path d="M193.3250375 379.225625h45.015c9.4940625 0 17....
https://stackoverflow.com/questions/79820918/how-to-load-svg-content-imagesnot-url-using-coil-on-android
android, kotlin, android-jetpack-compose, coil
1,763,219,849
se_31712046
stackoverflow
MOBILE_DEVELOPMENT
Kotlin unresolved reference in IntelliJ
Kotlin unresolved reference in IntelliJ I started off with this tutorial for learning Kotlin in IntelliJ IDEA. When I tried running the following example, fun main(args: Array<String>) { println("lol") } Build fails with the following error: Error:(5, 5) Kotlin: Unresolved reference: println This is the first ti...
https://stackoverflow.com/questions/31712046/kotlin-unresolved-reference-in-intellij
intellij-idea, jvm, kotlin
1,438,207,676
se_79819090
stackoverflow
MOBILE_DEVELOPMENT
Running Kotlin in VS Code Error - error: unresolved reference &#39;println&#39;
Running Kotlin in VS Code Error - error: unresolved reference &#39;println&#39; I'm using Windows. I downloaded the Kotlin compiler from JetBrains/kotlin GitHub. It is a zip file (kotlin-compiler-2.2.21.zip). Then I extract the file and put it in the following path: C:\Program Files Next I set the environment variabl...
https://stackoverflow.com/questions/79819090/running-kotlin-in-vs-code-error-error-unresolved-reference-println
kotlin, visual-studio-code
1,763,048,572
se_69156624
stackoverflow
MOBILE_DEVELOPMENT
onPressIn and onPressOut in jetpack compose
onPressIn and onPressOut in jetpack compose I have button to record voice so I want it to start record when user press it and stop when he leave it @Composable fun Screen(){ Button(){ Text("record") } }
https://stackoverflow.com/questions/69156624/onpressin-and-onpressout-in-jetpack-compose
android, kotlin, android-jetpack-compose, android-compose-button, android-jetpack-compose-button
1,631,499,959
se_79324526
stackoverflow
MOBILE_DEVELOPMENT
Android 12, Kotlin: Why is my app is not listed as an installed app under ACESSIBILITY when ACESSIBLITY INTENT is displayed?
Android 12, Kotlin: Why is my app is not listed as an installed app under ACESSIBILITY when ACESSIBLITY INTENT is displayed? I am writing an app that requires ACCESSIBILITY SERVICE PERMISSION. So, I have the following code that brings up ACCESSIBILITY intent as soon as the app is started. Under ACCESSIBILITY intent ->...
https://stackoverflow.com/questions/79324526/android-12-kotlin-why-is-my-app-is-not-listed-as-an-installed-app-under-acessi
android, kotlin, android-intent, permissions, accessibility
1,735,839,339
se_77717346
stackoverflow
MOBILE_DEVELOPMENT
androidx.credentials.exceptions.GetCredentialCancellationException: activity is cancelled by the user
androidx.credentials.exceptions.GetCredentialCancellationException: activity is cancelled by the user Trying to login with the Google Button in my android app using the credential manager, but the login shows the activity is cancelled by the user while choosing the gmail account from the popup. But it shows the error ...
https://stackoverflow.com/questions/77717346/androidx-credentials-exceptions-getcredentialcancellationexception-activity-is
android, kotlin, google-signin, credential-manager
1,703,595,033
se_79820197
stackoverflow
MOBILE_DEVELOPMENT
Custom icon in Android notification not working
Custom icon in Android notification not working I encountered an issue sending notifications in my Android app. I am setting my custom icon via .setSmallIcon(R.drawable.ic_bublic_2) but android ignores it and shows a default launcher icon instead. Here is my code: private fun publishNotification(title: String, body: S...
https://stackoverflow.com/questions/79820197/custom-icon-in-android-notification-not-working
android, kotlin, android-notifications
1,763,134,341
se_68001812
stackoverflow
MOBILE_DEVELOPMENT
How to correctly perform a http request with Kotlin Coroutines?
How to correctly perform a http request with Kotlin Coroutines? So, I have a following function which does a basic request using Ktor client to get a list of users, suspend fun createRequest(): List<User>? { return withContext(Dispatchers.IO) { try { val client = HttpClient(CIO) val...
https://stackoverflow.com/questions/68001812/how-to-correctly-perform-a-http-request-with-kotlin-coroutines
android, kotlin, kotlin-coroutines, coroutinescope, ktor-client
1,623,842,970
se_79820370
stackoverflow
MOBILE_DEVELOPMENT
React Native Android: How to correctly detect when another app is opened using AccessibilityService?
React Native Android: How to correctly detect when another app is opened using AccessibilityService? I’m building a React Native Android app where I need to track whenever the user opens another app (e.g., YouTube, Instagram, etc.). I am using a custom AccessibilityService, but the event for detecting the currently op...
https://stackoverflow.com/questions/79820370/react-native-android-how-to-correctly-detect-when-another-app-is-opened-using-a
android, react-native, kotlin, accessibility, accessibilityservice
1,763,147,258
se_79820164
stackoverflow
MOBILE_DEVELOPMENT
Does enableEdgeToEdge() override windowOptOutEdgeToEdgeEnforcement flag?
Does enableEdgeToEdge() override windowOptOutEdgeToEdgeEnforcement flag? I'm working with Android 15's edge-to-edge enforcement and need clarification on how enableEdgeToEdge() interacts with the windowOptOutEdgeToEdgeEnforcement theme attribute. Setup In my theme: <item name="android:windowOptOutEdgeToEdgeEnforcement...
https://stackoverflow.com/questions/79820164/does-enableedgetoedge-override-windowoptoutedgetoedgeenforcement-flag
android, kotlin, android-activity, android-xml, edge-to-edge
1,763,132,933
se_71732984
stackoverflow
MOBILE_DEVELOPMENT
How to use @LocalPort together with @DynamicPropertySource in a SpringBootTest?
How to use @LocalPort together with @DynamicPropertySource in a SpringBootTest? we have the following configuration application-local.yaml spring: security: oauth2: resourceserver: jwt: jwk-set-uri: http://localhost:8080/jwks application-production.yaml spring: security: oauth2: ...
https://stackoverflow.com/questions/71732984/how-to-use-localport-together-with-dynamicpropertysource-in-a-springboottest
spring-boot, kotlin, spring-test
1,649,054,442
se_79819372
stackoverflow
MOBILE_DEVELOPMENT
How to execute multiple bash commands in a single Gradle task (Kotlin)?
How to execute multiple bash commands in a single Gradle task (Kotlin)? I was trying: tasks.register<Exec>("runMultipleCommands") { workingDir = layout.buildDirectory.dir(".").get().asFile doLast { executable { commandLine("/bin/ls", "-l") } executable { comman...
https://stackoverflow.com/questions/79819372/how-to-execute-multiple-bash-commands-in-a-single-gradle-task-kotlin
kotlin, gradle
1,763,063,436
se_69853112
stackoverflow
MOBILE_DEVELOPMENT
Getting the viewmodel in my fragment using &#39;by viewModels()&#39; is displaying an error
Getting the viewmodel in my fragment using &#39;by viewModels()&#39; is displaying an error When trying to get a reference to the viewModel from the fragment, I get the following error: "Type 'Lazy<TypeVariable(VM)>' has no method 'getValue(LoginTabFragment, KProperty<*>)' and thus it cannot serve as a delegate". The ...
https://stackoverflow.com/questions/69853112/getting-the-viewmodel-in-my-fragment-using-by-viewmodels-is-displaying-an-er
android, kotlin, viewmodel
1,636,114,610
se_79819368
stackoverflow
MOBILE_DEVELOPMENT
Why is my continuous flow test code flaky?
Why is my continuous flow test code flaky? I am trying to test the number of times a Flow is collected - runTest { var count = 0 backgroundScope.launch(UnconfinedTestDispatcher(testScheduler)) { dao.getEntities().collect { count++ } } dao.upsertEntities(testData) asser...
https://stackoverflow.com/questions/79819368/why-is-my-continuous-flow-test-code-flaky
kotlin, unit-testing, kotlin-coroutines, kotlin-flow
1,763,062,953
se_79818752
stackoverflow
MOBILE_DEVELOPMENT
java.net.URISyntaxException: Illegal character in opaque part at index 2: after upgrading open api from 3.0.3 to 3.1.0
java.net.URISyntaxException: Illegal character in opaque part at index 2: after upgrading open api from 3.0.3 to 3.1.0 I have spring boot application written in Kotlin lang. We have REST API contract described in open api file. We use API first approach. So we use open api generator: plugins { ... id("org.open...
https://stackoverflow.com/questions/79818752/java-net-urisyntaxexception-illegal-character-in-opaque-part-at-index-2-after
spring-boot, kotlin, openapi, openapi-generator, openapi-generator-maven-plugin
1,763,030,807
se_79817843
stackoverflow
MOBILE_DEVELOPMENT
Passing image via interractive_asset_uri to Facebook does not work
Passing image via interractive_asset_uri to Facebook does not work I have been trying to pass image as an asset to Facebook as described here https://developers.facebook.com/docs/sharing/sharing-to-stories/android-developers/ in the Sharing a Sticker Asset section. Here is the code I have private suspend fun shareImag...
https://stackoverflow.com/questions/79817843/passing-image-via-interractive-asset-uri-to-facebook-does-not-work
android, kotlin, facebook
1,762,957,479
se_79818993
stackoverflow
MOBILE_DEVELOPMENT
Kotlin Exposed SQL query data with children - N+1 issue
Kotlin Exposed SQL query data with children - N+1 issue Currently, we have a lot of code like this one to query data inside our repositories: database.suspendedTransaction { Items .selectAll() .where { Items.userId eq userId } .map { Items.toItem( it, ...
https://stackoverflow.com/questions/79818993/kotlin-exposed-sql-query-data-with-children-n1-issue
sql, kotlin, join, kotlin-exposed
1,763,044,213
se_79817070
stackoverflow
MOBILE_DEVELOPMENT
How to make compose Image only be clickable on the image and not on the transparent background
How to make compose Image only be clickable on the image and not on the transparent background I am using compose Image as buttons, the images that I am displaying are all different kinds of shapes, and I am using .combinedClickable() on them like this: Image( bitmap = bitmap, ...
https://stackoverflow.com/questions/79817070/how-to-make-compose-image-only-be-clickable-on-the-image-and-not-on-the-transpar
android, kotlin, android-jetpack-compose
1,762,891,354
se_57755536
stackoverflow
MOBILE_DEVELOPMENT
Kotlin - How to convert Double to String in Kotlin without scientific notation?
Kotlin - How to convert Double to String in Kotlin without scientific notation? I want to set in text view full value of Double without scientific notation (Exponential), what is best approach? I tried convert Double value using method toString() on it, but I still have scientific value. tvDepth.text=depth.toString(...
https://stackoverflow.com/questions/57755536/kotlin-how-to-convert-double-to-string-in-kotlin-without-scientific-notation
java, android, kotlin, double, tostring
1,567,420,882
se_79361961
stackoverflow
MOBILE_DEVELOPMENT
android toolbar not working properly in api 35
android toolbar not working properly in api 35 I have an app which works great on every device, but I recently updated the target sdk to api 35 and now the toolbar of my app breaks in android api 35 and works fine on every other device upto api 35. I tried doing everything I could think of and also searched online but...
https://stackoverflow.com/questions/79361961/android-toolbar-not-working-properly-in-api-35
android, xml, kotlin, android-layout, android-toolbar
1,737,037,585
se_79818789
stackoverflow
MOBILE_DEVELOPMENT
Zombie deeplink Intent reopens from systems overview
Zombie deeplink Intent reopens from systems overview Steps to reproduce: notification --[intent]--> ...Annoucement Details with Pin Validation --[back]--> home screen --[SYSTEM nav bar back]--> exit app --[system bar overview reopen]--> {!!!BUG!!!} ...Annoucement Details with Pin Validation expected behaviour: notific...
https://stackoverflow.com/questions/79818789/zombie-deeplink-intent-reopens-from-systems-overview
android, kotlin, android-jetpack-compose
1,763,033,373
se_79818553
stackoverflow
MOBILE_DEVELOPMENT
What dependency for Swagger/OpenApi to work in Kotlin and WebFlux Spring Boot application?
What dependency for Swagger/OpenApi to work in Kotlin and WebFlux Spring Boot application? I tried a lot of different options, but I cannot find the right dependency that works with Kotlin ans WebFlux simulatneously. Which one should I use? Is it possible to have this setup?
https://stackoverflow.com/questions/79818553/what-dependency-for-swagger-openapi-to-work-in-kotlin-and-webflux-spring-boot-ap
spring-boot, kotlin, spring-webflux, openapi, swagger-ui
1,763,019,562
se_76772549
stackoverflow
MOBILE_DEVELOPMENT
Caused by: java.lang.ClassNotFoundException: org.apache.hc.client5.http.classic.HttpClient
Caused by: java.lang.ClassNotFoundException: org.apache.hc.client5.http.classic.HttpClient To address the same issue as here RestTemplate PATCH request in my spring-boot 3 application org.springframework.web.client.ResourceAccessException: I/O error on PATCH request for "http://localhost:8080/people/1":Invalid HTTP me...
https://stackoverflow.com/questions/76772549/caused-by-java-lang-classnotfoundexception-org-apache-hc-client5-http-classic
java, spring-boot, kotlin, resttemplate, spring-boot-3
1,690,383,074
se_77307522
stackoverflow
MOBILE_DEVELOPMENT
Is it possible to limit two decimal places with Float type without type conversion?
Is it possible to limit two decimal places with Float type without type conversion? Is it possible to limit two decimal places with Float type without type conversion in Kotlin? I hope it rounded(but not necessary) for example, I want a value of float type 1100.34610 -> 1100.35 (or 1100.34 is still fine) but should ke...
https://stackoverflow.com/questions/77307522/is-it-possible-to-limit-two-decimal-places-with-float-type-without-type-conversi
kotlin
1,697,533,155
se_65116128
stackoverflow
MOBILE_DEVELOPMENT
Kotlin: Public getter returns immutable list but private getter should return mutable list
Kotlin: Public getter returns immutable list but private getter should return mutable list I want my class to have a field that is return an immutable list for all public accesses but inside the object instance I want the list to be mutable so I can add elements to it. class GrammarParser { private val grammars...
https://stackoverflow.com/questions/65116128/kotlin-public-getter-returns-immutable-list-but-private-getter-should-return-mu
java, kotlin, collections
1,606,943,161
se_68378996
stackoverflow
MOBILE_DEVELOPMENT
Copying to clipboard on Kotlin Multiplatform
Copying to clipboard on Kotlin Multiplatform I couldn't find anyone doing this so far so I'll try and properly state the issues I am facing. I have a compose-ui module in the shared module of my KMP app. The compose-ui has a commonMain directory where all of the compose UI resides (screens that are shared between the ...
https://stackoverflow.com/questions/68378996/copying-to-clipboard-on-kotlin-multiplatform
android, kotlin, android-context, android-jetpack-compose, kotlin-multiplatform
1,626,269,153
se_72586298
stackoverflow
MOBILE_DEVELOPMENT
kotest change environment variables
kotest change environment variables I am writing tests for Ktor app using Kotests, but stumbled into the problem how can I change env variables for tests preferably globally. I have tried adding withEnvironment but it throw quite strange error into me Unable to make field private final java.util.Map java.util.Collecti...
https://stackoverflow.com/questions/72586298/kotest-change-environment-variables
kotlin, testing, kotest
1,654,966,881
se_76387803
stackoverflow
MOBILE_DEVELOPMENT
BuildConfig cannot resolve solution
BuildConfig cannot resolve solution Gradle buildConfigField BuildConfig cannot resolve symbol In latest android studio with gradle version 8.0.0 and above developer face this issu. When they try to import BuildConfig class with own package name but it's can't working. From the import can not found own packagename. So,...
https://stackoverflow.com/questions/76387803/buildconfig-cannot-resolve-solution
java, flutter, kotlin, dart
1,685,688,848
se_79817545
stackoverflow
MOBILE_DEVELOPMENT
Mobile screen gets pushed down when View appears above visible screen after event
Mobile screen gets pushed down when View appears above visible screen after event Project is using XML / Kotlin. Issue is with a nested scroll view or perhaps screen management in general. NestedScrollView Child 1 (hidden) Child 2 Child 3 Child 4 (screen is here) Clicking something on Child 4 causes Child 1 to appea...
https://stackoverflow.com/questions/79817545/mobile-screen-gets-pushed-down-when-view-appears-above-visible-screen-after-even
android, xml, kotlin
1,762,939,637
se_76189062
stackoverflow
MOBILE_DEVELOPMENT
warning: unknown enum constant Mode.LOCAL
warning: unknown enum constant Mode.LOCAL warning: unknown enum constant Mode.LOCAL reason: class file for com.facebook.infer.annotation.Nullsafe$Mode not found 1 warning Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/s/.pub-cache/hoste...
https://stackoverflow.com/questions/76189062/warning-unknown-enum-constant-mode-local
java, flutter, android-studio, kotlin
1,683,378,416
se_72703216
stackoverflow
MOBILE_DEVELOPMENT
Proper usage of com.fasterxml.jackson.module.kotlin.UIntDeserializer
Proper usage of com.fasterxml.jackson.module.kotlin.UIntDeserializer I would like to make use of extra deserializers defined for Kotlin-specific data types: UInt, ULong and UShort. The following code does work as expected: val actual: UInt = objectMapper.readValue("4294967295") val expected: UInt = 4294967295u assertT...
https://stackoverflow.com/questions/72703216/proper-usage-of-com-fasterxml-jackson-module-kotlin-uintdeserializer
json, kotlin, jackson, jackson-databind
1,655,824,276
se_75768068
stackoverflow
MOBILE_DEVELOPMENT
S3AsyncClient does not work with LocalStack when putting object
S3AsyncClient does not work with LocalStack when putting object When I try to put object in S3 using S3AsyncClient I get Data read has a different checksum than expected. @Test fun `verify data read has a different checksum than expected`() { val client = S3AsyncClient.builder() .credential...
https://stackoverflow.com/questions/75768068/s3asyncclient-does-not-work-with-localstack-when-putting-object
kotlin, amazon-s3, reactive-programming, localstack
1,679,059,239
se_79815440
stackoverflow
MOBILE_DEVELOPMENT
How to create a type safe functional extension in Kotlin with generics
How to create a type safe functional extension in Kotlin with generics I am expecting that only the first line of main function will be compiled. fun<T> T.shouldBe(arg:T) : Boolean { return this == arg } fun main() { 1.shouldBe(2) 1.shouldBe(true) 1.shouldBe("true") } But Kotlin accepts all lines. Th...
https://stackoverflow.com/questions/79815440/how-to-create-a-type-safe-functional-extension-in-kotlin-with-generics
kotlin, generics, extension-function, best-practices
1,762,768,546
se_67448034
stackoverflow
MOBILE_DEVELOPMENT
&quot;Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16&quot;
&quot;Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16&quot; The following error occurs when I tried to build the app: C:/Users/Lenovo/.gradle/caches/transforms-2/files-2.1/32f0bb3e96b47cf79ece6482359b6ad2/jetified-kotlin-stdlib-jdk7-1...
https://stackoverflow.com/questions/67448034/module-was-compiled-with-an-incompatible-version-of-kotlin-the-binary-version
android, android-studio, kotlin
1,620,480,096
se_79814739
stackoverflow
MOBILE_DEVELOPMENT
Only first DAO Flow of Room database returns values
Only first DAO Flow of Room database returns values I want to retrieve a specific column from my Android ROOM Database but it kept returning an empty list. Here is the code on my DAO interface: @Query("SELECT * FROM expense_table ORDER BY category ASC") fun getAllExpenses(): Flow<List<Expense>> @Query("SELECT DISTINC...
https://stackoverflow.com/questions/79814739/only-first-dao-flow-of-room-database-returns-values
android, kotlin, android-jetpack-compose, android-room, kotlin-flow
1,762,685,816
se_73620525
stackoverflow
MOBILE_DEVELOPMENT
Does any Android emulator provide an unfilled SIM slot?
Does any Android emulator provide an unfilled SIM slot? I want to remove insert SIM in Android Emulator, but I cannot see any setting there. How I can achieve it, or is there any specific model, here, in which we can insert and remove a SIM card?
https://stackoverflow.com/questions/73620525/does-any-android-emulator-provide-an-unfilled-sim-slot
java, android, kotlin, android-emulator, simulator
1,662,460,268
se_79814501
stackoverflow
MOBILE_DEVELOPMENT
why my navbar animation is not smooth at the start of application
why my navbar animation is not smooth at the start of application I just created some animation on my navbar. When i try to run it, i just wonder why the animation feels laggy at the start of application. And after some seconds, the animation start to feels smooth, but still increment the skippable count based on Layo...
https://stackoverflow.com/questions/79814501/why-my-navbar-animation-is-not-smooth-at-the-start-of-application
kotlin, android-jetpack-compose, android-animation
1,762,643,382
se_79814439
stackoverflow
MOBILE_DEVELOPMENT
ClassCastException when using ViewModelProvider.Factory in release build after R8 obfuscation (works fine in debug)
ClassCastException when using ViewModelProvider.Factory in release build after R8 obfuscation (works fine in debug) I'm facing a strange issue that only occurs in the release build of my Android app (signed and uploaded to Google Play). In debug mode, everything works perfectly. After publishing or installing the sign...
https://stackoverflow.com/questions/79814439/classcastexception-when-using-viewmodelprovider-factory-in-release-build-after-r
android, kotlin, android-jetpack, android-viewmodel, android-r8
1,762,633,966
se_68490601
stackoverflow
MOBILE_DEVELOPMENT
Fragments must call register registerForActivityResult() before they are created
Fragments must call register registerForActivityResult() before they are created I am working on shopping app and I created a fragment for adding products to productslist. I need to read an external storage permission to add a photo to products, so I am trying to use registerForActivityResult() in my fragment but I am...
https://stackoverflow.com/questions/68490601/fragments-must-call-register-registerforactivityresult-before-they-are-created
android, kotlin, permissions, fragment, registerforactivityresult
1,626,982,508
se_79813057
stackoverflow
MOBILE_DEVELOPMENT
Version catalogs: Naming/referencing dependencies
Version catalogs: Naming/referencing dependencies I try to understand how libraries are named in a toml version-catalog and then referred to, in a gradle-file. Obviously the last part of the "group" is repeated as the first part of the "name"? In the gradle-file "Implementation"-section first the "group" is used and ...
https://stackoverflow.com/questions/79813057/version-catalogs-naming-referencing-dependencies
java, android, kotlin, gradle, best-practices
1,762,591,669
se_79812944
stackoverflow
MOBILE_DEVELOPMENT
Why is the ServerValue.TIMESTAMP Realtime Database writing with such a large offset?
Why is the ServerValue.TIMESTAMP Realtime Database writing with such a large offset? I'm implementing an online presence feature in an Android app, recording a heartbeat periodically while the client is active. I'm using RTDB timestamp for this. But the recorded data is on the order of ~76 seconds in the future. Perha...
https://stackoverflow.com/questions/79812944/why-is-the-servervalue-timestamp-realtime-database-writing-with-such-a-large-off
android, kotlin, firebase-realtime-database, timestamp
1,762,571,362
se_72406491
stackoverflow
MOBILE_DEVELOPMENT
Show different content (layouts) depending on available width/height in Android Compose
Show different content (layouts) depending on available width/height in Android Compose I have an Activity and MyApp composable function. In the function I need to show either list with details or just list screen depending on the available width. How to determine available width for the content I want to show using J...
https://stackoverflow.com/questions/72406491/show-different-content-layouts-depending-on-available-width-height-in-android
android, kotlin, height, width, android-jetpack-compose
1,653,659,551
se_79806877
stackoverflow
MOBILE_DEVELOPMENT
Save and get large objects (BLOB) to postgresql using hibernate and Spring Data JPA
Save and get large objects (BLOB) to postgresql using hibernate and Spring Data JPA experts! I encountered the following problem: when trying to read a large file from a PostgreSQL database in a Spring Boot application using the Spring Data JPA framework, all the data is loaded into memory, even though the Blob class ...
https://stackoverflow.com/questions/79806877/save-and-get-large-objects-blob-to-postgresql-using-hibernate-and-spring-data
java, spring, postgresql, kotlin, hibernate
1,762,041,770
se_76806282
stackoverflow
MOBILE_DEVELOPMENT
How to disable swipe on screen ModalBottomSheetLayout in Jetpack Compose
How to disable swipe on screen ModalBottomSheetLayout in Jetpack Compose I am working with a ModalBottomSheet in Jetpack Compose and I need to disable the swipe feature. While I found a workaround that partially solves my issue, it introduced a new problem. Specifically, the LazyColumn inside the ModalBottomSheet is n...
https://stackoverflow.com/questions/76806282/how-to-disable-swipe-on-screen-modalbottomsheetlayout-in-jetpack-compose
android, kotlin, android-jetpack-compose
1,690,828,137
se_69705254
stackoverflow
MOBILE_DEVELOPMENT
navigateUp() and popBackStack() not working. Instead, they reload the current fragment
navigateUp() and popBackStack() not working. Instead, they reload the current fragment I am trying to navigate up the backstack. On calling the method view?.findNavController().navigateUp() and logging the destination using view?.findNavController().getCurrentDestination(), I see the function popping the current desti...
https://stackoverflow.com/questions/69705254/navigateup-and-popbackstack-not-working-instead-they-reload-the-current-fr
android, kotlin, navigation
1,635,152,316
se_69737938
stackoverflow
MOBILE_DEVELOPMENT
Jetpack compose: Bug with Textfield extract mode
Jetpack compose: Bug with Textfield extract mode I am developing an Android application with Jetpack compose, and I noticed that on screens with little vertical space, the textfield components switch to "full screen" over the keyboard (extract mode). So far the behavior is normal, however the weird behavior appears wh...
https://stackoverflow.com/questions/69737938/jetpack-compose-bug-with-textfield-extract-mode
android, kotlin, textfield, android-jetpack-compose
1,635,334,560
se_79809561
stackoverflow
MOBILE_DEVELOPMENT
Kotlin Serializer: Different SerialName per Serializers id/_id
Kotlin Serializer: Different SerialName per Serializers id/_id Using the "MongoDB Kotlin Driver" is there any best practices to define the data model? Particularly regarding the _id vs id while sharing the same data model to serialize through different serializer. Ideally the data is received in Json (with id), parsed...
https://stackoverflow.com/questions/79809561/kotlin-serializer-different-serialname-per-serializers-id-id
mongodb, kotlin, best-practices
1,762,308,181
se_63191084
stackoverflow
MOBILE_DEVELOPMENT
App crashes when launching camera to take picture on Redmi 7A
App crashes when launching camera to take picture on Redmi 7A My app automatically crashes when I launch camera to take picture on Redmi 7A. Following are the crash logs: E/CAM_CameraIntentManager: checkCallerLegality: Unknown caller: com.qikcircle.eclinic Please help it really does not show what exactly the issue...
https://stackoverflow.com/questions/63191084/app-crashes-when-launching-camera-to-take-picture-on-redmi-7a
android, kotlin, android-camera, android-camera-intent, redmi-device
1,596,195,119
se_79810298
stackoverflow
MOBILE_DEVELOPMENT
Creating Background Image in Itext7
Creating Background Image in Itext7 So, I was trying to add a background image into my table, but the syntax requires Background Image object which then requires PdfXObject val table = Table(floatArrayOf(50f, 50f)) .setAutoLayout() .useAllAvailableWidth() ...
https://stackoverflow.com/questions/79810298/creating-background-image-in-itext7
android, kotlin, itext
1,762,358,091
se_61833378
stackoverflow
MOBILE_DEVELOPMENT
What&#39;s the difference between .kt and .kts files in Kotlin. When should we use .kts file over .kt file?
What&#39;s the difference between .kt and .kts files in Kotlin. When should we use .kts file over .kt file? What is the purpose of using .kts files in Kotlin? Are these files included in the app bundle when releasing the app?
https://stackoverflow.com/questions/61833378/whats-the-difference-between-kt-and-kts-files-in-kotlin-when-should-we-use
android, kotlin, gradle-kotlin-dsl
1,589,614,317
se_79809943
stackoverflow
MOBILE_DEVELOPMENT
ClassCastException when using generic type
ClassCastException when using generic type I have this method: private inline fun <reified T> tryDecodeArray(content: String): Array<T> { try { return json.decodeFromString<Array<T>>(content) } catch (e: Exception) { Connexion.manageError(e) } return emptyArray() } I'm using it like th...
https://stackoverflow.com/questions/79809943/classcastexception-when-using-generic-type
kotlin
1,762,340,404
se_79806634
stackoverflow
MOBILE_DEVELOPMENT
Espresso.onIdle() return error java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
Espresso.onIdle() return error java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 After updating Kotlin to 2.2.0, my autotest started failing on the start screen with the following error in Espresso class on compose view: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 However, my autotest does not use any ...
https://stackoverflow.com/questions/79806634/espresso-onidle-return-error-java-lang-indexoutofboundsexception-index-1-si
java, android, kotlin, android-espresso, idle-processing
1,762,010,674
se_79810303
stackoverflow
MOBILE_DEVELOPMENT
kotlinx-serialization-json 1.9.0 library causes compile error &quot;Class &#39;kotlin.Unit&#39; was compiled with an incompatible version of Kotlin.&quot;
kotlinx-serialization-json 1.9.0 library causes compile error &quot;Class &#39;kotlin.Unit&#39; was compiled with an incompatible version of Kotlin.&quot; After adding the dependency org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0 I tried using it like this: import kotlinx.serialization.Serializable import kotl...
https://stackoverflow.com/questions/79810303/kotlinx-serialization-json-1-9-0-library-causes-compile-error-class-kotlin-uni
android, json, kotlin, serialization
1,762,358,225
se_70959644
stackoverflow
MOBILE_DEVELOPMENT
How to import other modules defined in the same Android app project inside Kotlin code?
How to import other modules defined in the same Android app project inside Kotlin code? I was trying to understand how to create multiple independent modules inside a project and use them in the main app module. I am using android studio Arctic Fox 2020.3.1. I have difficulty in importing the module into Kotlin code. ...
https://stackoverflow.com/questions/70959644/how-to-import-other-modules-defined-in-the-same-android-app-project-inside-kotli
android, android-studio, kotlin
1,643,820,941
se_79805342
stackoverflow
MOBILE_DEVELOPMENT
Race condition with android fragment back stack changed listener?
Race condition with android fragment back stack changed listener? I've got some code which looks like this in my main activity: class MainActivity : AppCompatActivity() { private val backStackListener = FragmentManager.OnBackStackChangedListener { val backStackEntryCount = getSupportFragmentManager().backS...
https://stackoverflow.com/questions/79805342/race-condition-with-android-fragment-back-stack-changed-listener
android, kotlin, android-fragments, fragment-backstack
1,761,875,352
se_79810037
stackoverflow
MOBILE_DEVELOPMENT
Is it possible to use media3 transformer to convert file to .wav file?
Is it possible to use media3 transformer to convert file to .wav file? val transformer = Transformer.Builder(this) .setAudioMimeType(MimeTypes.AUDIO_WAV) .build() Tried to build simple transformer but I get java.lang.IllegalStateException: Unsupported sample MIME type audio/wav These example f...
https://stackoverflow.com/questions/79810037/is-it-possible-to-use-media3-transformer-to-convert-file-to-wav-file
android, kotlin, wav, android-media3
1,762,345,224
se_79809804
stackoverflow
MOBILE_DEVELOPMENT
Can you close programatically an open Chrome Custom Tab Intent?
Can you close programatically an open Chrome Custom Tab Intent? I have implemented an authentication workflow using Activities which works fine: a proxy activity launches an Intent to open a web, and during the authentication the web redirects to a separate activity which upon creation signals the first to close itsel...
https://stackoverflow.com/questions/79809804/can-you-close-programatically-an-open-chrome-custom-tab-intent
android, kotlin, android-intent, uiaccessibility, advice
1,762,331,607
se_79809780
stackoverflow
MOBILE_DEVELOPMENT
Android Studio quits building with unexpected Exception
Android Studio quits building with unexpected Exception Android Studio Version: Android Studio Otter | 2025.2.1 Build #AI-252.25557.131.2521.14344949, built on October 29, 2025 When I build a release build with Android Studio, it stops with no error, only warnings. When I hover over the error icon, a tooltip displayin...
https://stackoverflow.com/questions/79809780/android-studio-quits-building-with-unexpected-exception
android, kotlin, android-studio
1,762,330,053
se_79598804
stackoverflow
MOBILE_DEVELOPMENT
Testing adaptive ad in Google Ad Manager
Testing adaptive ad in Google Ad Manager I am trying to create adaptive banner using Google Ad Manager. I have downloaded simple example of fixed banner from Google. The code is following: val adView = AdManagerAdView(this) adView.adUnitId = AD_UNIT_ID adView.setAdSize(AdSize.getCurrentOrientationAnchoredA...
https://stackoverflow.com/questions/79598804/testing-adaptive-ad-in-google-ad-manager
android, kotlin, ads, google-ad-manager
1,745,943,268
se_46185168
stackoverflow
MOBILE_DEVELOPMENT
How to inject dependencies in a ktor Application
How to inject dependencies in a ktor Application The documentation talks about dependency injection but does not really show how it is being done. Documentation is not completed as well and has a bunch of place holders: http://ktor.io/getting-started.html I tried to create my main function in a way that it accepts p...
https://stackoverflow.com/questions/46185168/how-to-inject-dependencies-in-a-ktor-application
java, unit-testing, dependency-injection, kotlin, ktor
1,505,249,618
se_79809675
stackoverflow
MOBILE_DEVELOPMENT
Issues running Integration tests in supabase-kt with failing serializer
Issues running Integration tests in supabase-kt with failing serializer I'm unable to set up Supabase in a Kotlin project to properly test my Edge Functions. This is happening, mainly, on PUT, POST & DELETE calls, while GETs are fine. The issue is around serialization; where it is unable to serialize the request corre...
https://stackoverflow.com/questions/79809675/issues-running-integration-tests-in-supabase-kt-with-failing-serializer
android, kotlin, supabase
1,762,322,716
se_79799752
stackoverflow
MOBILE_DEVELOPMENT
Objectify with Kotlin Ktor 3.3
Objectify with Kotlin Ktor 3.3 Objectify v6.1.3 With Kotlin and Ktor 3.1, I was calling ObjectifyService.begin() within the init {} block of my request handler base class and then closing that context once the request was finished. I never had a problem with it. With Ktor 3.3, it fails frequently. It looks to me tha...
https://stackoverflow.com/questions/79799752/objectify-with-kotlin-ktor-3-3
kotlin, kotlin-coroutines, ktor, objectify
1,761,428,398
se_79808549
stackoverflow
MOBILE_DEVELOPMENT
How to call a composable function after a certain time in Jetpack Compose?
How to call a composable function after a certain time in Jetpack Compose? When my application starts, I launch an animation. Now I would like to switch to another component (navbar) after 30 seconds. In my research, I saw that the delay function from the Kotlin Coroutines library is used, but it doesn't directly acce...
https://stackoverflow.com/questions/79808549/how-to-call-a-composable-function-after-a-certain-time-in-jetpack-compose
kotlin, timer, android-jetpack-compose, kotlin-coroutines
1,762,235,287
se_79808350
stackoverflow
MOBILE_DEVELOPMENT
How do I romanize Chinese (pinyin) on an Android app?
How do I romanize Chinese (pinyin) on an Android app? I want to convert Chinese characters (Simplified and Traditional Chinese) to pinyin. For context, I'm adding a feature to a third-party music player for YouTube Music. The feature being Chinese lyrics romanization. But I have no idea which tools to use. There seems...
https://stackoverflow.com/questions/79808350/how-do-i-romanize-chinese-pinyin-on-an-android-app
android, kotlin, tooling-recommendation
1,762,207,701
se_79757415
stackoverflow
MOBILE_DEVELOPMENT
How to remove the overlay STT box from the SpeechRecognizer API in Android Studio?
How to remove the overlay STT box from the SpeechRecognizer API in Android Studio? While making a STT app in Android Studio (Jetpack Compose). I encountered this in the SpeechRecognizer when I ran the app: STT in app I want to delete that so the UI looks more clean. Is there a way to do that? I have thought of doing a...
https://stackoverflow.com/questions/79757415/how-to-remove-the-overlay-stt-box-from-the-speechrecognizer-api-in-android-studi
android, kotlin, user-interface, android-jetpack-compose, speech-recognition
1,757,146,196
se_79779780
stackoverflow
MOBILE_DEVELOPMENT
Refreshing access token from Snapchat
Refreshing access token from Snapchat I'm using com.snap.loginkit:loginkit:3.0.0 and I'm confused. I managed to get login to work and I get access token successfully but after some time it expires and I need a new one. My question is how to use refresh token to get new access token since I can't seem to find anything ...
https://stackoverflow.com/questions/79779780/refreshing-access-token-from-snapchat
android, kotlin, authentication, oauth-2.0, snapchat
1,759,306,121
se_79148972
stackoverflow
MOBILE_DEVELOPMENT
Best practice for DTO mapping in Kotlin/Spring Boot with ManyToOne/OneToMany
Best practice for DTO mapping in Kotlin/Spring Boot with ManyToOne/OneToMany I'm learning Kotlin in DDD and there is one thing I don't know Currently, I have these two entities : @Entity @Table(name = "events") class EventEntity( @Id val id: Long?, val title: String, @OneToMany @JoinColumn(name = "...
https://stackoverflow.com/questions/79148972/best-practice-for-dto-mapping-in-kotlin-spring-boot-with-manytoone-onetomany
kotlin, mapping, domain-driven-design
1,730,483,647