# Android

**URL:** https://discuss.kotlinlang.org/c/android/7.md

[Latest](https://discuss.kotlinlang.org/latest.md) · [Categories](https://discuss.kotlinlang.org/categories.md)

---

## [About the Android category](https://discuss.kotlinlang.org/t/about-the-android-category/1334)

<div class="topic-metadata">

**Author:** [@Roman\_Belov](https://discuss.kotlinlang.org/u/Roman_Belov)\
**Replies:** 0\
**Last updated:** [December 4, 2015, 7:55am UTC](https://discuss.kotlinlang.org/t/about-the-android-category/1334 "2015-12-04T07:55:50Z")

</div>

Developing Android applications with Kotlin. See also the #android channel in Kotlin Slack (you can sign up here). Important note: If your question is not specifically related to the Kotlin language, please consider as…

---

## [Kotlin and Python](https://discuss.kotlinlang.org/t/kotlin-and-python/31214)

<div class="topic-metadata">

**Author:** [@pythonh05](https://discuss.kotlinlang.org/u/pythonh05)\
**Replies:** 0\
**Last updated:** [September 1, 2026, 10:06pm UTC](https://discuss.kotlinlang.org/t/kotlin-and-python/31214 "2026-09-01T22:06:44Z")

</div>

i have been trying hard to intergrate python in my kotlin android app I CAME ACCROSS THESE SOLUTIONS -the use of chaqoupy -the use of an api USE OF CHAQUOPY The truth is ,according to what i have tested i my self …

---

## [Exploring whether Rust source files can be automatically parsed to generate JNI bindings, Kotlin APIs, and Android build integration through a Gradle plugin](https://discuss.kotlinlang.org/t/exploring-whether-rust-source-files-can-be-automatically-parsed-to-generate-jni-bindings-kotlin-apis-and-android-build-integration-through-a-gradle-plugin/31098)

<div class="topic-metadata">

**Author:** [@Kingjha13](https://discuss.kotlinlang.org/u/Kingjha13)\
**Replies:** 2\
**Last updated:** [June 23, 2026, 5:35pm UTC](https://discuss.kotlinlang.org/t/exploring-whether-rust-source-files-can-be-automatically-parsed-to-generate-jni-bindings-kotlin-apis-and-android-build-integration-through-a-gradle-plugin/31098 "2026-06-23T17:35:18Z")

</div>

Exploring a Gradle Plugin for Automatic Rust ↔ Kotlin Bindings on Android Hi everyone, I’m an Android developer currently learning Rust and experimenting with Rust integration in Android applications. While working wit…

---

## [Date && simpledateformat](https://discuss.kotlinlang.org/t/date-simpledateformat/31001)

<div class="topic-metadata">

**Author:** [@gunsailor66](https://discuss.kotlinlang.org/u/gunsailor66)\
**Replies:** 6\
**Last updated:** [March 24, 2026, 10:07pm UTC](https://discuss.kotlinlang.org/t/date-simpledateformat/31001 "2026-03-24T22:07:05Z")

</div>

hello there! i try to implement a simple UTC time for all the world… I thought i had succeed. But recently i updated from panda 1 to panda 2 ( android studio ) and my code doesn’t work anymore. Here is a simple code t…

---

## [Audio output from multiple Web Views simultaneously](https://discuss.kotlinlang.org/t/audio-output-from-multiple-web-views-simultaneously/30982)

<div class="topic-metadata">

**Author:** [@marc](https://discuss.kotlinlang.org/u/marc)\
**Replies:** 0\
**Last updated:** [February 28, 2026, 10:24pm UTC](https://discuss.kotlinlang.org/t/audio-output-from-multiple-web-views-simultaneously/30982 "2026-02-28T22:24:36Z")

</div>

Hi, When I add two Web Views with audio to an activity, it seems like Android will only play the audio from one Web View at a time. Is it possible to hear the audio output from both web views simultaneously? Best regar…

---

## [Does not recompose when global MutableState is not in MainActivity.kt](https://discuss.kotlinlang.org/t/does-not-recompose-when-global-mutablestate-is-not-in-mainactivity-kt/30967)

<div class="topic-metadata">

**Author:** [@Megadash452](https://discuss.kotlinlang.org/u/Megadash452)\
**Replies:** 5\
**Last updated:** [February 18, 2026, 6:45pm UTC](https://discuss.kotlinlang.org/t/does-not-recompose-when-global-mutablestate-is-not-in-mainactivity-kt/30967 "2026-02-18T18:45:14Z")

</div>

I am working on an Android app with Jetpack Compose. Here I need to load data (a list of strings) from the app’s storage to display in a LazyColumn, and allow this list to be updated based on user interaction. Essentiall…

---

## [Understanding if a Selector object can encounter a runtime-error on itself?](https://discuss.kotlinlang.org/t/understanding-if-a-selector-object-can-encounter-a-runtime-error-on-itself/30894)

<div class="topic-metadata">

**Author:** [@VishalSehgal](https://discuss.kotlinlang.org/u/VishalSehgal)\
**Replies:** 0\
**Last updated:** [December 18, 2025, 4:03am UTC](https://discuss.kotlinlang.org/t/understanding-if-a-selector-object-can-encounter-a-runtime-error-on-itself/30894 "2025-12-18T04:03:00Z")

</div>

Once a java.nio.channels.Selector has been successfully opened via Selector.open(), and multiple channels have been registered with it and are actively being selected, can the Selector itself encounter a runtime failure …

---

## [Weird and Unsolvable Exception](https://discuss.kotlinlang.org/t/weird-and-unsolvable-exception/30573)

<div class="topic-metadata">

**Author:** [@Abhiram\_Deshpande](https://discuss.kotlinlang.org/u/Abhiram_Deshpande)\
**Replies:** 11\
**Last updated:** [December 5, 2025, 7:59am UTC](https://discuss.kotlinlang.org/t/weird-and-unsolvable-exception/30573 "2025-12-05T07:59:16Z")

</div>

Hi. While developing an app on Android Studio ( Meerkat Feature Drop | 2024.3.2 Patch 1 ), everything was going fine till today morning when, in order to create a ViewModel and Relevant Factory, I created a class called …

---

## [Extra branches in the when statement (coverage)](https://discuss.kotlinlang.org/t/extra-branches-in-the-when-statement-coverage/30874)

<div class="topic-metadata">

**Author:** [@exfaust31](https://discuss.kotlinlang.org/u/exfaust31)\
**Replies:** 0\
**Last updated:** [December 3, 2025, 2:58pm UTC](https://discuss.kotlinlang.org/t/extra-branches-in-the-when-statement-coverage/30874 "2025-12-03T14:58:42Z")

</div>

Trying to get code coverage with a “when” expression using Kover or Intellij Coverage Plugin. There are always extra branches that prevent you from achieving 100% coverage. For example, the Intellij Coverage plugin and …

---

## [Should I convert from Groovy DSL to Kotlin DSL?](https://discuss.kotlinlang.org/t/should-i-convert-from-groovy-dsl-to-kotlin-dsl/30806)

<div class="topic-metadata">

**Author:** [@elpafras](https://discuss.kotlinlang.org/u/elpafras)\
**Replies:** 3\
**Last updated:** [November 2, 2025, 6:10pm UTC](https://discuss.kotlinlang.org/t/should-i-convert-from-groovy-dsl-to-kotlin-dsl/30806 "2025-11-02T18:10:52Z")

</div>

I have an Android application with Groovy DSL. Should I convert it to Kotlin DSL, and does anyone know how to convert from Groovy to Kotlin?

---

## [Error on pausing / resuming / stoping the audio](https://discuss.kotlinlang.org/t/error-on-pausing-resuming-stoping-the-audio/30807)

<div class="topic-metadata">

**Author:** [@truebillionhari](https://discuss.kotlinlang.org/u/truebillionhari)\
**Replies:** 0\
**Last updated:** [October 27, 2025, 5:36am UTC](https://discuss.kotlinlang.org/t/error-on-pausing-resuming-stoping-the-audio/30807 "2025-10-27T05:36:21Z")

</div>

class AudioSource constructor ( context: Context ){ private val mediaRecorder = MediaRecorder(context) private val outputFile = File(context.getExternalFilesDir(Environment.DIRECTORY\_MUSIC),"sample.mp4") …

---

## [Updated Kotlin Courses for 2025](https://discuss.kotlinlang.org/t/updated-kotlin-courses-for-2025/30271)

<div class="topic-metadata">

**Author:** [@madrinenamulindwa90](https://discuss.kotlinlang.org/u/madrinenamulindwa90)\
**Replies:** 1\
**Last updated:** [September 16, 2025, 8:23am UTC](https://discuss.kotlinlang.org/t/updated-kotlin-courses-for-2025/30271 "2025-09-16T08:23:27Z")

</div>

Good day here , I am learning Kotlin for Android development but I am facing a challenge as all the course I have come across are a bit outdate. Any recommendations for updated courses??

---

## [Why does my Kotlin Android app crash when using coroutines in ViewModel?](https://discuss.kotlinlang.org/t/why-does-my-kotlin-android-app-crash-when-using-coroutines-in-viewmodel/30709)

<div class="topic-metadata">

**Author:** [@stevediaz](https://discuss.kotlinlang.org/u/stevediaz)\
**Replies:** 2\
**Last updated:** [September 16, 2025, 8:19am UTC](https://discuss.kotlinlang.org/t/why-does-my-kotlin-android-app-crash-when-using-coroutines-in-viewmodel/30709 "2025-09-16T08:19:33Z")

</div>

Hello I am developing an Android app in Kotlin and recently added coroutines to handle background tasks in my ViewModel. :slightly\_smiling\_face: The issue is that when the screen rotates or the activity is recreated; th…

---

## [BottomModalLayout OnDismiss is closing on clicking outside the scrim](https://discuss.kotlinlang.org/t/bottommodallayout-ondismiss-is-closing-on-clicking-outside-the-scrim/30757)

<div class="topic-metadata">

**Author:** [@truebillionhari](https://discuss.kotlinlang.org/u/truebillionhari)\
**Replies:** 1\
**Last updated:** [September 13, 2025, 1:31pm UTC](https://discuss.kotlinlang.org/t/bottommodallayout-ondismiss-is-closing-on-clicking-outside-the-scrim/30757 "2025-09-13T13:31:10Z")

</div>

val scope = rememberCoroutineScope() val sheetState = rememberModalBottomSheetState( skipPartiallyExpanded = true, confirmValueChange = { it == SheetValue.Expanded } ) …

---

## [listOf get index numbers](https://discuss.kotlinlang.org/t/listof-get-index-numbers/30699)

<div class="topic-metadata">

**Author:** [@mynixmail.fever](https://discuss.kotlinlang.org/u/mynixmail.fever)\
**Replies:** 2\
**Last updated:** [August 13, 2025, 5:45pm UTC](https://discuss.kotlinlang.org/t/listof-get-index-numbers/30699 "2025-08-13T17:45:27Z")

</div>

I am following this tutorial here. class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) enableEdgeToEdge() val p…

---

## [Why am I getting "Attempt to invoke virtual method 'java.io.FileInputStream android.content.Context.openFileInput(java.lang.String)' on a null object reference"](https://discuss.kotlinlang.org/t/why-am-i-getting-attempt-to-invoke-virtual-method-java-io-fileinputstream-android-content-context-openfileinput-java-lang-string-on-a-null-object-reference/30658)

<div class="topic-metadata">

**Author:** [@IS](https://discuss.kotlinlang.org/u/IS)\
**Replies:** 1\
**Last updated:** [August 3, 2025, 10:02am UTC](https://discuss.kotlinlang.org/t/why-am-i-getting-attempt-to-invoke-virtual-method-java-io-fileinputstream-android-content-context-openfileinput-java-lang-string-on-a-null-object-reference/30658 "2025-08-03T10:02:15Z")

</div>

Hello, I am developing an android application using Android Studios and Kotlin, and for this I made a helper class that helps me save data to an external file and load that data upon startup. This is a snapshot of the fu…

---

## [Android studio apps making error](https://discuss.kotlinlang.org/t/android-studio-apps-making-error/30621)

<div class="topic-metadata">

**Author:** [@bluemoon132](https://discuss.kotlinlang.org/u/bluemoon132)\
**Replies:** 1\
**Last updated:** [August 2, 2025, 7:07pm UTC](https://discuss.kotlinlang.org/t/android-studio-apps-making-error/30621 "2025-08-02T19:07:10Z")

</div>

file:///E:/SwipupYourfaceapps/app/build.gradle.kts:28:31: Unresolved reference: VERSION\_1\_6

---

## [Connecting to Mariadb database](https://discuss.kotlinlang.org/t/connecting-to-mariadb-database/30372)

<div class="topic-metadata">

**Author:** [@joyinhealth1](https://discuss.kotlinlang.org/u/joyinhealth1)\
**Replies:** 6\
**Last updated:** [June 30, 2025, 11:38am UTC](https://discuss.kotlinlang.org/t/connecting-to-mariadb-database/30372 "2025-06-30T11:38:13Z")

</div>

Please can I have an example of connecting to a maria/mysql database I have tried many examples/tutorials to no avail.

---

## [Failed	https://dl.google.com/dl/android/maven2/com/google/](https://discuss.kotlinlang.org/t/failed-https-dl-google-com-dl-android-maven2-com-google/30521)

<div class="topic-metadata">

**Author:** [@nety.email](https://discuss.kotlinlang.org/u/nety.email)\
**Replies:** 1\
**Last updated:** [June 30, 2025, 9:38am UTC](https://discuss.kotlinlang.org/t/failed-https-dl-google-com-dl-android-maven2-com-google/30521 "2025-06-30T09:38:24Z")

</div>

When trying to create a project in Android Studio, the download logs consistently show about 30-60 downloads failing. Example: Failed https://dl.google.com/dl/android/maven2/com/google/protobuf/protobuf-java/3.25.5/prot…

---

## [Issue Intercepting JavaScript-Based Navigation in Android WebView (Blank Screen on Link Click)](https://discuss.kotlinlang.org/t/issue-intercepting-javascript-based-navigation-in-android-webview-blank-screen-on-link-click/30525)

<div class="topic-metadata">

**Author:** [@Mizu216](https://discuss.kotlinlang.org/u/Mizu216)\
**Replies:** 0\
**Last updated:** [June 30, 2025, 3:10am UTC](https://discuss.kotlinlang.org/t/issue-intercepting-javascript-based-navigation-in-android-webview-blank-screen-on-link-click/30525 "2025-06-30T03:10:49Z")

</div>

I’m trying to intercept navigation within a WebView. The problem occurs when a link is clicked — the website runs JavaScript that causes the screen to go blank, even though I’m intercepting the navigation using shouldOve…

---

## [Howto re-order my buttons?](https://discuss.kotlinlang.org/t/howto-re-order-my-buttons/30431)

<div class="topic-metadata">

**Author:** [@erikonbali](https://discuss.kotlinlang.org/u/erikonbali)\
**Replies:** 2\
**Last updated:** [June 6, 2025, 8:48am UTC](https://discuss.kotlinlang.org/t/howto-re-order-my-buttons/30431 "2025-06-06T08:48:48Z")

</div>

Hi All, I’m new to Kotlin. I made an app for displaying Jazz sheets. But now I want the 35 presenting buttons re-order, so it’s alphabetical correct. Replacing the ‘button-blocks’ in XML did not the trick. I assume i…

---

## [There are no ecs library for android app development](https://discuss.kotlinlang.org/t/there-are-no-ecs-library-for-android-app-development/30307)

<div class="topic-metadata">

**Author:** [@Neeraj\_Sharma](https://discuss.kotlinlang.org/u/Neeraj_Sharma)\
**Replies:** 0\
**Last updated:** [May 2, 2025, 11:30pm UTC](https://discuss.kotlinlang.org/t/there-are-no-ecs-library-for-android-app-development/30307 "2025-05-02T23:30:45Z")

</div>

There is no ECS library for developing Android apps, so I tried using the ECS way to create a simple todo application. Anyone interested, please check. If you have any ideas, please share them! github quick view

---

## [Show physical address in Google Maps API](https://discuss.kotlinlang.org/t/show-physical-address-in-google-maps-api/17036)

<div class="topic-metadata">

**Author:** [@mreyes](https://discuss.kotlinlang.org/u/mreyes)\
**Replies:** 2\
**Last updated:** [April 20, 2025, 12:52pm UTC](https://discuss.kotlinlang.org/t/show-physical-address-in-google-maps-api/17036 "2025-04-20T12:52:18Z")

</div>

I’m developing a Kotlin application using Google Maps API. I would like to show into snippet or title the physical address when is touching the Marker. The application allows create markers when is long pressed (Using s…

---

## [Sync folder/file detection in Android](https://discuss.kotlinlang.org/t/sync-folder-file-detection-in-android/30245)

<div class="topic-metadata">

**Author:** [@rajnikhil705](https://discuss.kotlinlang.org/u/rajnikhil705)\
**Replies:** 0\
**Last updated:** [April 18, 2025, 11:08am UTC](https://discuss.kotlinlang.org/t/sync-folder-file-detection-in-android/30245 "2025-04-18T11:08:45Z")

</div>

In my application, I want to allow the user to select a file, which comeback as a URI. This URI can natively resolve to a file path. I want to determine whether the file is stored locally or if it’s from a synced cloud s…

---

## [Kotlin For android app development](https://discuss.kotlinlang.org/t/kotlin-for-android-app-development/7924)

<div class="topic-metadata">

**Author:** [@jenny56248](https://discuss.kotlinlang.org/u/jenny56248)\
**Replies:** 2\
**Last updated:** [May 26, 2018, 4:17pm UTC](https://discuss.kotlinlang.org/t/kotlin-for-android-app-development/7924 "2018-05-26T16:17:27Z")

</div>

Hello all, I am trying to learn android app development from scratch with kotlin. I have learn basics like variable, functions, methods etc. from kotlin’s official site : https://kotlinlang.org Can you guys help me to…

---

## [Unable to read Gmail and system app notifications with NotificationListenerServic](https://discuss.kotlinlang.org/t/unable-to-read-gmail-and-system-app-notifications-with-notificationlistenerservic/30220)

<div class="topic-metadata">

**Author:** [@sambatmessi10](https://discuss.kotlinlang.org/u/sambatmessi10)\
**Replies:** 0\
**Last updated:** [April 11, 2025, 6:36am UTC](https://discuss.kotlinlang.org/t/unable-to-read-gmail-and-system-app-notifications-with-notificationlistenerservic/30220 "2025-04-11T06:36:18Z")

</div>

I’m building an Android app that includes a feature for logging all incoming notifications on the device. To capture these notifications, I’m using NotificationListenerService, and for persistent storage, I’m utilizing R…

---

## [SRC\_IMAGE\_ANCHOR\_TYPE not fetching the inner link on WebView](https://discuss.kotlinlang.org/t/src-image-anchor-type-not-fetching-the-inner-link-on-webview/30160)

<div class="topic-metadata">

**Author:** [@ferreira.kevin94](https://discuss.kotlinlang.org/u/ferreira.kevin94)\
**Replies:** 0\
**Last updated:** [March 26, 2025, 4:34pm UTC](https://discuss.kotlinlang.org/t/src-image-anchor-type-not-fetching-the-inner-link-on-webview/30160 "2025-03-26T16:34:30Z")

</div>

While using “hitTestResult” on WebView, i actually face an issue while fetching the inner link of an “image link”, in which it seems to be worked with “SRC\_IMAGE\_ANCHOR\_TYPE” but the result of this attempt results into f…

---

## [Notification from Firebase does not show when app is closed](https://discuss.kotlinlang.org/t/notification-from-firebase-does-not-show-when-app-is-closed/30039)

<div class="topic-metadata">

**Author:** [@Phela](https://discuss.kotlinlang.org/u/Phela)\
**Replies:** 0\
**Last updated:** [March 6, 2025, 6:18pm UTC](https://discuss.kotlinlang.org/t/notification-from-firebase-does-not-show-when-app-is-closed/30039 "2025-03-06T18:18:25Z")

</div>

I made 2 Sheets and 1 Popup in different files to make the code of the MainActivity tidy and to call on them in a wrapped file called HSApp.kt. This, when the User taps the notification, each respective sheet or popup wi…

---

## [Execution failed for task ':dash\_bubble:compileDebugKotlin'](https://discuss.kotlinlang.org/t/execution-failed-for-task-compiledebugkotlin/29974)

<div class="topic-metadata">

**Author:** [@chegmarco](https://discuss.kotlinlang.org/u/chegmarco)\
**Replies:** 1\
**Last updated:** [March 2, 2025, 8:10am UTC](https://discuss.kotlinlang.org/t/execution-failed-for-task-compiledebugkotlin/29974 "2025-03-02T08:10:10Z")

</div>

Hello. Knowing that my android/build.gradle is: buildscript { ext.kotlin\_version = '2.1.10' repositories { google() mavenCentral() } dependencies { classpath 'com.android.tools.…

---

## [App encomendas e corrida](https://discuss.kotlinlang.org/t/app-encomendas-e-corrida/29965)

<div class="topic-metadata">

**Author:** [@andre17gt](https://discuss.kotlinlang.org/u/andre17gt)\
**Replies:** 0\
**Last updated:** [February 28, 2025, 3:37am UTC](https://discuss.kotlinlang.org/t/app-encomendas-e-corrida/29965 "2025-02-28T03:37:24Z")

</div>

// AndroidManifest.xml // // // build.gradle (Module :app) // dependencies { // implementation ‘androidx.compose.ui:ui:1.0.1’ // implementation ‘com.google.android.gms:play-services-maps:17.0.0’ // i…

[Next page](https://discuss.kotlinlang.org/c/android/7.md?page=1)
