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_79995959
stackoverflow
MOBILE_DEVELOPMENT
Adaptive tab layout in Jetpack Compose
Adaptive tab layout in Jetpack Compose I have a custom tab row with this behaviour: If all tabs fit, they share the available width equally. If they don't fit, each tab uses its required width and the row becomes horizontally scrollable. Each tab has a label and optional badge. Selecting a partially hidden tab scr...
https://stackoverflow.com/questions/79995959/adaptive-tab-layout-in-jetpack-compose
best-practices, android, kotlin, android-jetpack-compose
1,787,005,666
se_79995533
stackoverflow
MOBILE_DEVELOPMENT
Compose InputTransformation for Custom Keypad Validation
Compose InputTransformation for Custom Keypad Validation I am using the state-based BasicTextField API in Jetpack Compose with a custom numeric keypad. I want the TextFieldState to contain only the raw digits, while an OutputTransformation displays them as a 12-hour time. For example, the input behaves like this: raw ...
https://stackoverflow.com/questions/79995533/compose-inputtransformation-for-custom-keypad-validation
advice, android, kotlin, android-jetpack-compose
1,786,873,987
se_78823208
stackoverflow
MOBILE_DEVELOPMENT
Scaffold vs Surface
Scaffold vs Surface I'm going through some of the initial Android/Kotlin Google Codelabs. The current No Action template from Android Studio provides a code skeleton with a Scaffold top-level. But the Codelabs show Surface for that purpose instead. I'm assuming this is due to some historical shift? I commonly have to ...
https://stackoverflow.com/questions/78823208/scaffold-vs-surface
android, kotlin, android-jetpack-compose, google-codelab
1,722,550,260
se_79995491
stackoverflow
MOBILE_DEVELOPMENT
Gradle cannot resolve com.android.application:9.3.0 in Android Studio
Gradle cannot resolve com.android.application:9.3.0 in Android Studio I have a problem with Gradle synchronization in Android Studio. Gradle cannot find the com.android.application plugin version 9.3.0.
https://stackoverflow.com/questions/79995491/gradle-cannot-resolve-com-android-application9-3-0-in-android-studio
kotlin, android-studio, gradle
1,786,857,047
se_79995497
stackoverflow
MOBILE_DEVELOPMENT
Unresolved reference 'ExposedDropdownMenu' in one file only - correct code, survives Invalidate Caches + Clean Rebuild
Unresolved reference 'ExposedDropdownMenu' in one file only - correct code, survives Invalidate Caches + Clean Rebuild I have a Jetpack Compose screen that fails to build with this error: e: AssignTaskScreen.kt:16:35 Unresolved reference 'ExposedDropdownMenu'. This same error was already fixed in other files...
https://stackoverflow.com/questions/79995497/unresolved-reference-exposeddropdownmenu-in-one-file-only-correct-code-surv
android, kotlin, gradle, android-jetpack-compose
1,786,861,652
se_79993422
stackoverflow
MOBILE_DEVELOPMENT
Android build failed for kotlin with ksp
Android build failed for kotlin with ksp Unable to load class 'com.google.devtools.ksp.impl.KotlinSymbolProcessing$ExitCode' com.google.devtools.ksp.impl.KotlinSymbolProcessing$ExitCode Dependencies classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:2.3.10' plugins id 'org.jetbrains.kotlin.android' version '2.3.10...
https://stackoverflow.com/questions/79993422/android-build-failed-for-kotlin-with-ksp
android, kotlin, build, ksp
1,786,522,252
se_79995318
stackoverflow
MOBILE_DEVELOPMENT
Cannot access 'RowColumnParentData.weight' - internal in file - Compose Foundation + Kotlin 2.2.10
Cannot access 'RowColumnParentData.weight' - internal in file - Compose Foundation + Kotlin 2.2.10 I'm getting this error when building an Android app using Jetpack Compose: e: ApprovalDetailScreen.kt:12:43 Cannot access 'val RowColumnParentData?.weight: Float': it is internal in file. This happens even thoug...
https://stackoverflow.com/questions/79995318/cannot-access-rowcolumnparentdata-weight-internal-in-file-compose-foundati
android, kotlin, android-jetpack-compose
1,786,785,653
se_79991488
stackoverflow
MOBILE_DEVELOPMENT
How StateFlow.collectAsState() works
How StateFlow.collectAsState() works val users = mainVM.users.collectAsState().value Does .collectAsState() return a State-object, which becomes updated each time the users-collection changes? Is then .value called automatically each time? How do I think about the whole mechanism? Corresponding code from the ViewMode...
https://stackoverflow.com/questions/79991488/how-stateflow-collectasstate-works
advice, android, kotlin, android-jetpack-compose, kotlin-coroutines
1,786,169,683
se_44971228
stackoverflow
MOBILE_DEVELOPMENT
Java SAM interface created from Kotlin gives ClassCastException
Java SAM interface created from Kotlin gives ClassCastException I have a java method: addHandler(HttpServiceHandler handler) HttpServiceHandler is interface HttpServiceHandler extends Consumer<HttpHandlerContext> The point is to avoid Consumer<HttpHandlerContext> copy-paste across the project, so it's kind of a type...
https://stackoverflow.com/questions/44971228/java-sam-interface-created-from-kotlin-gives-classcastexception
kotlin
1,499,431,871
se_79993393
stackoverflow
MOBILE_DEVELOPMENT
my UI functions randomly stopped working when I created a new project
my UI functions randomly stopped working when I created a new project I put UI code Text() in a function, and out of a function: (Kotlin) @Composable @Preview(showBackground = true) fun UI() { Text("HelloWorld") } And I placed it inside onCreate: class MainActivity : ComponentActivity() { override fun onCreat...
https://stackoverflow.com/questions/79993393/my-ui-functions-randomly-stopped-working-when-i-created-a-new-project
android, kotlin, android-jetpack-compose
1,786,514,591
se_78519175
stackoverflow
MOBILE_DEVELOPMENT
Spring Boot - Web vs Webflux for RESTAPI
Spring Boot - Web vs Webflux for RESTAPI I am trying to decide whether to use Spring Web or Webflux for a RESTAPI. I have done my research and read from a lot of developers on forums that Webflux is not so great because how difficult it is to code and debug and can even be slower than Web in some cases. However, offic...
https://stackoverflow.com/questions/78519175/spring-boot-web-vs-webflux-for-restapi
spring, spring-boot, kotlin, spring-mvc, spring-webflux
1,716,399,166
se_79995053
stackoverflow
MOBILE_DEVELOPMENT
Usecases of Kotlin contracts AT_MOST_ONCE for callsInPlace()
Usecases of Kotlin contracts AT_MOST_ONCE for callsInPlace() Kotlin contracts offer a powerful feature - CallsInPlace(callable, kind) function. There are four different kinds that can be passed as a parameter: EXACTLY_ONCE AT_LEAST_ONCE AT_MOST_ONCE UNKNOWN Usecases for EXACTLY_ONCE and UNKNOWN are clear (val as...
https://stackoverflow.com/questions/79995053/usecases-of-kotlin-contracts-at-most-once-for-callsinplace
best-practices, kotlin, kotlin-contracts
1,786,703,759
se_79559481
stackoverflow
MOBILE_DEVELOPMENT
Kotlin multiplatform - build local libraries
Kotlin multiplatform - build local libraries I am currently trying to use Kotlin multiplatform to build a library of UI assets/widgets that I can use across dedicated native projects (Android, iOS and desktop). My goal is to have compiled libraries in .AAR, .A and .JAR format, that I can share with other developers. M...
https://stackoverflow.com/questions/79559481/kotlin-multiplatform-build-local-libraries
android, kotlin, kotlin-multiplatform
1,744,017,626
se_79452424
stackoverflow
MOBILE_DEVELOPMENT
How to refresh image in Coil 3 without modifying the URL or relying on context in KMP?
How to refresh image in Coil 3 without modifying the URL or relying on context in KMP? I am working on a Kotlin Multiplatform Project (android and desktop(windows)) that uses Coil 3 for loading images in a Jetpack Compose UI. My goal is to refresh an image when the user clicks a refresh button. However, I’ve encounter...
https://stackoverflow.com/questions/79452424/how-to-refresh-image-in-coil-3-without-modifying-the-url-or-relying-on-context-i
kotlin, android-jetpack-compose, coil, kmp
1,739,990,175
se_79993462
stackoverflow
MOBILE_DEVELOPMENT
Activity with excludeFromRecents=&quot;true&quot;, launchMode=&quot;singleTask&quot;, and a custom taskAffinity is destroyed when another app is launched
Activity with excludeFromRecents=&quot;true&quot;, launchMode=&quot;singleTask&quot;, and a custom taskAffinity is destroyed when another app is launched After displaying ActivityA, which is declared with the following attributes in AndroidManifest.xml, launching an unrelated app causes ActivityA.onDestroy() to be cal...
https://stackoverflow.com/questions/79993462/activity-with-excludefromrecents-true-launchmode-singletask-and-a-custom-t
java, android, kotlin
1,786,529,944
se_79991829
stackoverflow
MOBILE_DEVELOPMENT
How to extract the sender&#39;s phone number from WhatsApp notifications in Android?
How to extract the sender&#39;s phone number from WhatsApp notifications in Android? This code snippet implements a custom NotificationListenerService in Android to capture incoming notifications from WhatsApp and WhatsApp Business on Android 8.0 (API level 26) and higher. When a new notification arrives, the service ...
https://stackoverflow.com/questions/79991829/how-to-extract-the-senders-phone-number-from-whatsapp-notifications-in-android
android, kotlin, notifications, whatsapp
1,786,340,458
se_79991114
stackoverflow
MOBILE_DEVELOPMENT
Is it possible to serialize a kotlin enum class without a custom serializer?
Is it possible to serialize a kotlin enum class without a custom serializer? I'm working on a kotlin project where we are using an enum class to map some property values to corresponding string constants. I am investigating the possibility of replacing the hard coded mapping with a json file that I can load and parse ...
https://stackoverflow.com/questions/79991114/is-it-possible-to-serialize-a-kotlin-enum-class-without-a-custom-serializer
json, kotlin, serialization, enums, gson
1,786,040,870
se_77256809
stackoverflow
MOBILE_DEVELOPMENT
AndroidX&#39;s Edge to Edge shows an Action Bar - How to hide it?
AndroidX&#39;s Edge to Edge shows an Action Bar - How to hide it? I've implemented Edge to Edge in my Android app, I've set the Status/Navigation bars to be transparent, and it works well. However suddenly an ActionBar appeared on top of my screen, even though I've set the app theme to be "android:Theme.Material.Light...
https://stackoverflow.com/questions/77256809/androidxs-edge-to-edge-shows-an-action-bar-how-to-hide-it
android, xml, kotlin, android-jetpack-compose, edge-to-edge
1,696,834,717
se_77692596
stackoverflow
MOBILE_DEVELOPMENT
com.google.android.gms.common.api.ApiException: 16: User disabled the feature
com.google.android.gms.common.api.ApiException: 16: User disabled the feature I am making an app using Jetpack and Kotlin, I implemented Google oneTap signIn using Firebase. It was working properly, but once I pressed the back button on the sign in popup. That popup screen never showed again. I tried many things like ...
https://stackoverflow.com/questions/77692596/com-google-android-gms-common-api-apiexception-16-user-disabled-the-feature
firebase, kotlin, firebase-authentication, android-jetpack-compose, google-one-tap
1,703,084,932
se_79992000
stackoverflow
MOBILE_DEVELOPMENT
Kotlin/Native/cinterop pointer to custom class
Kotlin/Native/cinterop pointer to custom class I've been playing with Kotlin/Native and cinterop, and I found myself needing to have a pointer to my own class, something like this: class Point(rawPtr: NativePtr) : CPointed(rawPtr) { var x = 0 var y = 0 } ... memScoped { val testPtr = allocPointerTo<Point...
https://stackoverflow.com/questions/79992000/kotlin-native-cinterop-pointer-to-custom-class
kotlin, pointers, kotlin-native
1,786,381,096
se_69766570
stackoverflow
MOBILE_DEVELOPMENT
ERROR Task :expo:compileDebugKotlin FAILED
ERROR Task :expo:compileDebugKotlin FAILED I created an application using react-native init and was working fine until I tried to start using expo to test it on my telephone. Trying to start the app with expo (npx expo start), I have: Developer tools running on http://localhost:19002 Opening developer tools in the bro...
https://stackoverflow.com/questions/69766570/error-task-expocompiledebugkotlin-failed
react-native, kotlin, expo
1,635,499,801
se_73260974
stackoverflow
MOBILE_DEVELOPMENT
Why this two items have different width in Jetpack Compose
Why this two items have different width in Jetpack Compose I am learning textfield in Jetpack Compose. I want to use multiple time so I make a function and use it. when I am passing start padding it decreases the width of other one. Where am I wrong here? Column( modifier = Modifier .fillMaxSize() ...
https://stackoverflow.com/questions/73260974/why-this-two-items-have-different-width-in-jetpack-compose
android, kotlin, android-jetpack-compose, android-jetpack, android-compose-textfield
1,659,799,022
se_74027320
stackoverflow
MOBILE_DEVELOPMENT
Filter bonded device in bluetooth android
Filter bonded device in bluetooth android I am building a Health application in which blood pressure monitor is used. I already paired so many BLE devices. I want to filter only particular device like Blood Pressure Monitor. I also did this in scan filter through like this BloodPressurePairViewModel.kt class BloodPres...
https://stackoverflow.com/questions/74027320/filter-bonded-device-in-bluetooth-android
android, kotlin, bluetooth, bluetooth-lowenergy, android-bluetooth
1,665,487,381
se_63989275
stackoverflow
MOBILE_DEVELOPMENT
How can I convert Persian (Farsi) and Arabic numbers to English numbers in Kotlin?
How can I convert Persian (Farsi) and Arabic numbers to English numbers in Kotlin? I want to pass a date as string to a web service. When I get the date in devices that use Persian, localized digits are Persian and the server can't convert this string to DateTime. So I need to convert all digits to English. The date I...
https://stackoverflow.com/questions/63989275/how-can-i-convert-persian-farsi-and-arabic-numbers-to-english-numbers-in-kotli
android, kotlin, number-formatting, farsi, number-systems
1,600,679,386
se_79990071
stackoverflow
MOBILE_DEVELOPMENT
Exoplayer: Subtitles in jetpack compose
Exoplayer: Subtitles in jetpack compose I'm making a media player, but I just can't seem to add subtitles. I immediately retrieve all the subtitles and pass them to MediaItem. When the user selects new subtitles, I retrieve them using trackSelectionParameters, where the ID is the link. The player plays them and saves ...
https://stackoverflow.com/questions/79990071/exoplayer-subtitles-in-jetpack-compose
android, kotlin, android-jetpack-compose, exoplayer
1,785,754,506
se_79564858
stackoverflow
MOBILE_DEVELOPMENT
Android instantApp error : Missing split for &lt;com.my-pacakge-name&gt; when installing via play-store
Android instantApp error : Missing split for &lt;com.my-pacakge-name&gt; when installing via play-store I built and tested the instant-app successfully on a real device with Android-studio. Then I created the .aab file and uploaded it to the playStore (for internal testers), without any error. When I try to use the ap...
https://stackoverflow.com/questions/79564858/android-instantapp-error-missing-split-for-com-my-pacakge-name-when-installi
android, kotlin, gradle, android-manifest, android-instant-apps
1,744,216,320
se_79990568
stackoverflow
MOBILE_DEVELOPMENT
Suspend function &#39;flow.first()&#39;can only be called from a coroutine or another suspend function
Suspend function &#39;flow.first()&#39;can only be called from a coroutine or another suspend function I edited this because I'm not entirely sure the answers here are going to work for my code. fun generateKey(keyValue: String): Preferences.Key<String> { val key: Preferences.Key<String> = stringPreferencesKey(ke...
https://stackoverflow.com/questions/79990568/suspend-function-flow-firstcan-only-be-called-from-a-coroutine-or-another-su
kotlin, kotlin-flow
1,785,901,734
se_79989859
stackoverflow
MOBILE_DEVELOPMENT
How to restore a previous UI state with StateFlow?
How to restore a previous UI state with StateFlow? I have the following screen flow: Initial → StateA → Loading → StateB The ViewModel first fetches some initial data and then renders StateA. The user enters values manually and presses Next. I then show Loading, call another API, and display StateB. When the user pres...
https://stackoverflow.com/questions/79989859/how-to-restore-a-previous-ui-state-with-stateflow
best-practices, android, kotlin, android-viewmodel
1,785,663,532
se_79655580
stackoverflow
MOBILE_DEVELOPMENT
HiltTestRunner not found during instrumented tests – ClassNotFoundException
HiltTestRunner not found during instrumented tests – ClassNotFoundException I'm trying to run instrumented tests in my Android project using Hilt for dependency injection. However, the test run fails with the following error: Test run failed to complete. Instrumentation run failed due to Process crashed. Logcat of las...
https://stackoverflow.com/questions/79655580/hilttestrunner-not-found-during-instrumented-tests-classnotfoundexception
android, kotlin, android-instrumentation
1,749,196,892
se_72634225
stackoverflow
MOBILE_DEVELOPMENT
onBackPressed() is deprecated. What is the alternative?
onBackPressed() is deprecated. What is the alternative? I have upgraded targetSdkVersion and compileSdkVersion to 33. I am now getting a warning telling me that onBackPressed is deprecated. I see suggestions to use android.window.OnBackInvokedCallback or androidx.activity.OnBackPressedCallback to handle back navigatio...
https://stackoverflow.com/questions/72634225/onbackpressed-is-deprecated-what-is-the-alternative
android, kotlin, navigation, deprecation-warning, android-tiramisu
1,655,307,730
se_65093431
stackoverflow
MOBILE_DEVELOPMENT
Adding dependency to androidx.fragment:fragment-ktx:1.3.0-beta01 causes runtime exception
Adding dependency to androidx.fragment:fragment-ktx:1.3.0-beta01 causes runtime exception I need to add a dependency to androidx.fragment:fragment-ktx:1.3.0-beta01 in an app that uses Android navigation and dynamic features. I need the dependency to call setFragmentResult, but the app would stop working with an except...
https://stackoverflow.com/questions/65093431/adding-dependency-to-androidx-fragmentfragment-ktx1-3-0-beta01-causes-runtime
android, kotlin, android-fragments, navigation
1,606,836,482
se_79989826
stackoverflow
MOBILE_DEVELOPMENT
Kotlin daemon compilation failed: Could not connect to Kotlin daemon process in Android Studio
Kotlin daemon compilation failed: Could not connect to Kotlin daemon process in Android Studio I am facing a build issue in my Android project (Kotlin/Jetpack Compose) using Android Studio on Windows. The Error: Daemon compilation failed: Could not connect to Kotlin daemon process at org.jetbrains.kotlin.compiler...
https://stackoverflow.com/questions/79989826/kotlin-daemon-compilation-failed-could-not-connect-to-kotlin-daemon-process-in
java, android, kotlin
1,785,652,580
se_79989068
stackoverflow
MOBILE_DEVELOPMENT
How to fix this error &quot;Failed to apply plugin &#39;dev.flutter.flutter-gradle-plugin&#39; &quot;?
How to fix this error &quot;Failed to apply plugin &#39;dev.flutter.flutter-gradle-plugin&#39; &quot;? I have been for the error for an hour and tried multiple gradle packages to rectify this error.But, I don't know what to do . I have updated my flutter stable.Done all that.But none is working and coming back to wher...
https://stackoverflow.com/questions/79989068/how-to-fix-this-error-failed-to-apply-plugin-dev-flutter-flutter-gradle-plugin
java, android, flutter, kotlin, gradle
1,785,389,387
se_79989059
stackoverflow
MOBILE_DEVELOPMENT
How to compare a flow&lt;string&gt; and a string in an if statement
How to compare a flow&lt;string&gt; and a string in an if statement I need to write a logic gate like this: if (getPrefs(keyValue) == "false") { //do something here } getPrefs(keyValue) returns Flow<String> How do I compare a string and a flow string?
https://stackoverflow.com/questions/79989059/how-to-compare-a-flowstring-and-a-string-in-an-if-statement
kotlin
1,785,386,053
se_67294776
stackoverflow
MOBILE_DEVELOPMENT
registerForActivityResult not working when second activity orientation changes
registerForActivityResult not working when second activity orientation changes I am calling activity B from activity A using the ActivityResultLauncher and setting the result from activity B when the task is done. This works perfectly if orientation is not changed. The problem is when I change orientation from activit...
https://stackoverflow.com/questions/67294776/registerforactivityresult-not-working-when-second-activity-orientation-changes
android, kotlin, android-intent, kotlin-android-extensions, startactivityforresult
1,619,591,081
se_79648501
stackoverflow
MOBILE_DEVELOPMENT
How to create a list the Material 3 Expressive way
How to create a list the Material 3 Expressive way How can a list be visually updated to give a Material 3 Expressive appearence? Considering the recent visual update to the Settings app on Google Pixel devices, is custom styling being used? My list (which looks flat and plain) LazyColumn { items(1) { index -> ...
https://stackoverflow.com/questions/79648501/how-to-create-a-list-the-material-3-expressive-way
android, kotlin, android-jetpack-compose, android-jetpack-compose-material3, material-3-expressive
1,748,857,597
se_79988032
stackoverflow
MOBILE_DEVELOPMENT
Compose Preview different from emulated on device
Compose Preview different from emulated on device I am trying to follow this simple tutorial to get started but i ran into a snag. I have it emulating to a device via wifi but i cant seem to find where the problem is. I read back and forth through it and it kinda annoys me that the tutorial is not updated, but can som...
https://stackoverflow.com/questions/79988032/compose-preview-different-from-emulated-on-device
android, kotlin, android-jetpack-compose
1,785,370,703
se_57176433
stackoverflow
MOBILE_DEVELOPMENT
kotlin : unit test with mock injection (mockK)
kotlin : unit test with mock injection (mockK) I followed step by step instructions from many blogs for implementing a mock with MockK: class SWServiceImplTest { @MockK lateinit var externalApi: ExternalApiService @InjectMockKs lateinit var SWService: SWServiceImpl @Before fun setUp() = Moc...
https://stackoverflow.com/questions/57176433/kotlin-unit-test-with-mock-injection-mockk
spring-boot, kotlin, junit, mockk
1,563,949,214
se_57490228
stackoverflow
MOBILE_DEVELOPMENT
How to upload an image to a server using http request in kotlin?
How to upload an image to a server using http request in kotlin? I have written code to upload images to the server using kotlin, that is, the user takes a picture through the camera then displays the image in the imageView when the user clicks the send button, I want the image from ImageView to be sent to the server,...
https://stackoverflow.com/questions/57490228/how-to-upload-an-image-to-a-server-using-http-request-in-kotlin
android, kotlin, httprequest, retrofit, image-uploading
1,565,768,584
se_79987698
stackoverflow
MOBILE_DEVELOPMENT
How to solve deprecation of TooltipDefaults.rememberRichTooltipPositionProvider()
How to solve deprecation of TooltipDefaults.rememberRichTooltipPositionProvider() I have a TooltipBox with a warning that TooltipDefaults.rememberRichTooltipPositionProvider() is deprecated. Like this: TooltipBox( positionProvider = TooltipDefaults.rememberRichTooltipPositionProvider(), ... ) How to solve this ...
https://stackoverflow.com/questions/79987698/how-to-solve-deprecation-of-tooltipdefaults-rememberrichtooltippositionprovider
kotlin, android-jetpack-compose
1,785,287,162
se_48761390
stackoverflow
MOBILE_DEVELOPMENT
How to parse JSON in Kotlin
How to parse JSON in Kotlin How can I parse JSON in Kotlin? It gets the entire array from JSON but can not get a particular object from the Array. It worked in Java but not in Kotlin. try { val jsonObject = JSONObject(result) val users = jsonObject.getJSONArray("Users") for (i in 0 until users.length())...
https://stackoverflow.com/questions/48761390/how-to-parse-json-in-kotlin
android, json, parsing, kotlin
1,518,506,291
se_79946586
stackoverflow
MOBILE_DEVELOPMENT
Broken session_start in Firebase for Android
Broken session_start in Firebase for Android I've got a random issue in my Android application where in most Firebase crash logs I have an obscene amount of session_start events coming out of nowhere. I've never seen this on my other projects, and it started randomly. I can't really get my head around why there are so...
https://stackoverflow.com/questions/79946586/broken-session-start-in-firebase-for-android
android, firebase, kotlin, google-analytics, crashlytics
1,779,770,997
se_79986024
stackoverflow
MOBILE_DEVELOPMENT
How to replace Handler() based code with lifecycle based code
How to replace Handler() based code with lifecycle based code I have been searching how to replace the Handler() based code I got from https://developer.android.com/develop/connectivity/bluetooth/ble/find-ble-devices#kotlin with a lifecycle based version, but all of the code I have found is all about views, there is n...
https://stackoverflow.com/questions/79986024/how-to-replace-handler-based-code-with-lifecycle-based-code
android, kotlin, timeout, android-lifecycle
1,785,068,108
se_79985932
stackoverflow
MOBILE_DEVELOPMENT
Error from lintReportDebug: Error: Call requires permission which may be rejected by user:
Error from lintReportDebug: Error: Call requires permission which may be rejected by user: I copy-pasted some code from the Find BLE devices documentation, but I am getting this error: /home/heller/DeliveryBox/MobileApp/DeliveryBox_Android/app/src/main/java/com/deepsoft/deliverybox/BluetoothManager.kt:55: Error: Call ...
https://stackoverflow.com/questions/79985932/error-from-lintreportdebug-error-call-requires-permission-which-may-be-rejecte
android, kotlin, bluetooth-lowenergy
1,785,020,574
se_79981638
stackoverflow
MOBILE_DEVELOPMENT
Why does my function say that my AlarmManager Alarm still exists?
Why does my function say that my AlarmManager Alarm still exists? I'm building a "Cancel alarm" button, and a "check alarm" button. The "Cancel Alarm" button works. I am sure of it. but when I press the "Check Alarm" button, it still return true. Some context: I want `true` to mean "Your alarm still exists, and WILL f...
https://stackoverflow.com/questions/79981638/why-does-my-function-say-that-my-alarmmanager-alarm-still-exists
android, kotlin
1,784,300,376
se_79980468
stackoverflow
MOBILE_DEVELOPMENT
Kotlin: Generate random number from 0 to 1 inclusive
Kotlin: Generate random number from 0 to 1 inclusive I'm trying to get a random Float in the range [0..1], which includes 0 and 1. This code will never produce 1: Math.random().toFloat() Is there a Float equivalent to the range function such as (5..15).rand() in kotlin (which will produce everything between 5 and 15...
https://stackoverflow.com/questions/79980468/kotlin-generate-random-number-from-0-to-1-inclusive
kotlin, random
1,783,975,770
se_56671453
stackoverflow
MOBILE_DEVELOPMENT
kotlin, where the return from inside the let go
kotlin, where the return from inside the let go @kotlin.internal.InlineOnly public inline fun <T, R> T.let(block: (T) -> R): R { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } return block(this) } and have a function like: fun getType() : String? { val type = mContent.let { ...
https://stackoverflow.com/questions/56671453/kotlin-where-the-return-from-inside-the-let-go
kotlin, let
1,560,958,825
se_45219379
stackoverflow
MOBILE_DEVELOPMENT
How to make an API request in Kotlin?
How to make an API request in Kotlin? I am extremely new to Kotlin and APIs in general and can't find the syntax to create an API request using this language. I am creating a mobile version of a website so I'm using Android Studio to create a new UI for an already established backend. What are the steps and syntax to ...
https://stackoverflow.com/questions/45219379/how-to-make-an-api-request-in-kotlin
android, rest, kotlin
1,500,565,229
se_70971152
stackoverflow
MOBILE_DEVELOPMENT
How to make a text clickable in Jetpack Compose? And also toggle it to non-clickable after selecting once
How to make a text clickable in Jetpack Compose? And also toggle it to non-clickable after selecting once This is my code: Text( text = "Resend OTP", fontSize = 20.sp, color = Textfieldcolor, style = TextStyle(textDecoration = TextDecoration.Underline) ) I want the text to be clickable once and then ...
https://stackoverflow.com/questions/70971152/how-to-make-a-text-clickable-in-jetpack-compose-and-also-toggle-it-to-non-click
kotlin, android-jetpack-compose, android-jetpack, android-compose-textfield, compose-multiplatform
1,643,890,644
se_79913213
stackoverflow
MOBILE_DEVELOPMENT
How Can My App React to Power Connecting/Disconnecting Even When Closed?
How Can My App React to Power Connecting/Disconnecting Even When Closed? I have tried creating a context-registered receiver following the docs and other examples on StackOverflow, but for some reason none of these logs ever fire. Not when the app is open, not when it's closed - never. Using ACTION_POWER_CONNECTED and...
https://stackoverflow.com/questions/79913213/how-can-my-app-react-to-power-connecting-disconnecting-even-when-closed
android, kotlin
1,774,327,831
se_79983765
stackoverflow
MOBILE_DEVELOPMENT
Android ACTION_SEND to X always returns RESULT_CANCELED after posting successfully
Android ACTION_SEND to X always returns RESULT_CANCELED after posting successfully I launch the Android Sharesheet with an ACTION_SEND intent to share an image. After the user selects the X (Twitter) app, I need to know whether the post was completed or canceled. The relevant code is: var chosenComponent: ComponentNam...
https://stackoverflow.com/questions/79983765/android-action-send-to-x-always-returns-result-canceled-after-posting-successful
android, kotlin, twitter, android-jetpack-compose
1,784,704,113
se_49664617
stackoverflow
MOBILE_DEVELOPMENT
How to fix concurrent modification exception in Kotlin
How to fix concurrent modification exception in Kotlin This is my code, in which I am adding data to a list: fun bindProcess(listOfDocId: MutableList<String>, isActvityLogEnabled: Boolean): Observable<MutableList<SearchResultModel>> { return Observable.create<MutableList<SearchResultModel>> { var filtere...
https://stackoverflow.com/questions/49664617/how-to-fix-concurrent-modification-exception-in-kotlin
android, kotlin
1,522,905,419
se_58812220
stackoverflow
MOBILE_DEVELOPMENT
Extract numbers from a string kotlin
Extract numbers from a string kotlin String.replaceAll is not running and is unsupported in Kotlin. Example: var string = "vsdhfnmsdbvfuf121535435aewr" string.replace("[^0-9]".toRegex(), "")
https://stackoverflow.com/questions/58812220/extract-numbers-from-a-string-kotlin
java, android, kotlin
1,573,534,265
se_79981575
stackoverflow
MOBILE_DEVELOPMENT
Kotlin Multiplatform quickstart - Chrome won&#39;t display sample &quot;webApp [wasmJs]:&quot;
Kotlin Multiplatform quickstart - Chrome won&#39;t display sample &quot;webApp [wasmJs]:&quot; Created "Kotlin Multiplatform quickstart" for a "web": https://kotlinlang.org/docs/multiplatform/quickstart.html Using: IntelliJ IDEA 2026.2 Build #IU-262.8665.258, built on July 15, 2026 java version "21.0.11" 2026-04-21 ...
https://stackoverflow.com/questions/79981575/kotlin-multiplatform-quickstart-chrome-wont-display-sample-webapp-wasmjs
macos, kotlin, google-chrome, intellij-idea, kotlin-multiplatform
1,784,285,330
se_78813017
stackoverflow
MOBILE_DEVELOPMENT
How to generate openapi in ktor?
How to generate openapi in ktor? I'm writing some rstAPI with Ktor and want it to be autodocumentated. I don't need swagger HTML generation and stuff, just raw openapi.yml Searching for "ktor openapi generation" and etc gives me official docs link (https://ktor.io/docs/server-openapi.htm) But, if I try to write same c...
https://stackoverflow.com/questions/78813017/how-to-generate-openapi-in-ktor
kotlin, ktor
1,722,360,708
se_79982151
stackoverflow
MOBILE_DEVELOPMENT
Google Maps Android SDK: onMapReady() is called but map tiles never render (marker visible, API key configured)
Google Maps Android SDK: onMapReady() is called but map tiles never render (marker visible, API key configured) I'm facing a strange issue with the Google Maps SDK in my Android app. Problem onMapReady() is called successfully. I receive a valid GoogleMap object. I can add markers. No crashes occur. However, the map t...
https://stackoverflow.com/questions/79982151/google-maps-android-sdk-onmapready-is-called-but-map-tiles-never-render-mark
java, android, kotlin
1,784,533,784
se_72678339
stackoverflow
MOBILE_DEVELOPMENT
hiltViewModel&lt;ViewModel&gt;() vs by viewModels()
hiltViewModel&lt;ViewModel&gt;() vs by viewModels() While creating and reviewing applications that use dagger-hilt I noticed that most people, to create an instance of their viewModel class, use something like val viewModel: XViewModel by viewModels() and some use val viewModel = hiltViewModel<XViewModel>() is ther...
https://stackoverflow.com/questions/72678339/hiltviewmodelviewmodel-vs-by-viewmodels
android, kotlin, dependency-injection, dagger-hilt
1,655,654,108
se_71508282
stackoverflow
MOBILE_DEVELOPMENT
Fastest way to remove first n elements from MutableList
Fastest way to remove first n elements from MutableList I am programming in Kotlin and have a MutableList from which I would like to remove the first n elements from that specific list instance. This means that functions like MutableList.drop(n) are out of the question. One solution would of course be to loop and call...
https://stackoverflow.com/questions/71508282/fastest-way-to-remove-first-n-elements-from-mutablelist
list, kotlin, time-complexity, big-o, mutablelist
1,647,500,961
se_79981836
stackoverflow
MOBILE_DEVELOPMENT
How do I pass a remembered variable to the function call in remember&#39;s brackets?
How do I pass a remembered variable to the function call in remember&#39;s brackets? I need to run a function when this variable: val isEnabled by remember {} updates, and I need to pass the same variable into that same function, when the function runs. I know this code won't work, but its the closest thing I can get ...
https://stackoverflow.com/questions/79981836/how-do-i-pass-a-remembered-variable-to-the-function-call-in-remembers-brackets
android, kotlin
1,784,376,773
se_68187868
stackoverflow
MOBILE_DEVELOPMENT
Android Jetpack Compose NumberPicker Widget Equivalent
Android Jetpack Compose NumberPicker Widget Equivalent What is the recommended solution for creating a NumberPicker Widget in Jetpack Compose? Similar to the image below. I am able to create an NumberPicker using an AndroidView within my composable but the view does not seem to allow flings or snap to position. Btw...
https://stackoverflow.com/questions/68187868/android-jetpack-compose-numberpicker-widget-equivalent
kotlin, android-jetpack, android-jetpack-compose, numberpicker, android-number-picker
1,625,021,537
se_69656802
stackoverflow
MOBILE_DEVELOPMENT
Unable to find method void org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions.setUseIR(boolean)
Unable to find method void org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions.setUseIR(boolean) I'm unable to run any tests or run the app or debugger because of this error: `Unable to find method void org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions.setUseIR(boolean)` I've tried all of the provided solutions and hit t...
https://stackoverflow.com/questions/69656802/unable-to-find-method-void-org-jetbrains-kotlin-gradle-dsl-kotlinjvmoptions-setu
java, android-studio, kotlin, gradle, okhttp
1,634,797,197
se_79981201
stackoverflow
MOBILE_DEVELOPMENT
Hibernate enum array validation not working
Hibernate enum array validation not working I have this entity @Entity @Table(name = "animal") class Animal( @Column(columnDefinition = "animals[]") @Enumerated(EnumType.STRING) val animals: Array<Animals>, created: LocalDate = LocalDate.now(), ) { @Id @GeneratedValue(strategy = GenerationType....
https://stackoverflow.com/questions/79981201/hibernate-enum-array-validation-not-working
java, kotlin, hibernate
1,784,186,447
se_79981153
stackoverflow
MOBILE_DEVELOPMENT
Android CameraX not focusing on tap
Android CameraX not focusing on tap I'm trying to implement tap to focus using CameraX but I can't debug why it is not working, despite the focus result return true. This is a snippet from inside of my Camera compose. previewView.setOnTouchListener { view, motionEvent -> when (motionEvent.action) { MotionE...
https://stackoverflow.com/questions/79981153/android-camerax-not-focusing-on-tap
android, kotlin, android-jetpack-compose, android-camerax
1,784,166,934
se_68576435
stackoverflow
MOBILE_DEVELOPMENT
How to use .svg file in Jetpack Compose for Desktop?
How to use .svg file in Jetpack Compose for Desktop? I am trying to use a .svg (vector file) to show an image but I am stuck and not able to do it. Is there any way I can use it, I tried to use it like this Image(imageFromResource("svg_file_name.svg"),contentDescription="") But it throws an error : Exception in threa...
https://stackoverflow.com/questions/68576435/how-to-use-svg-file-in-jetpack-compose-for-desktop
kotlin, android-jetpack-compose, compose-desktop
1,627,563,747
se_79825675
stackoverflow
MOBILE_DEVELOPMENT
Custom overlay when detecting device recording
Custom overlay when detecting device recording I am trying to make a custom overlay for my application that will hide the screen if any screen share or unauthorized recording of my app is running. The problem is, that I am trying to avoid using FLAG_SECURE, because it doesn't allow me to add custom elements to inform ...
https://stackoverflow.com/questions/79825675/custom-overlay-when-detecting-device-recording
java, android, kotlin
1,763,652,194
se_66586212
stackoverflow
MOBILE_DEVELOPMENT
How to solve Error creating bean with name &#39;configurationPropertiesBeans&#39; defined in class path?
How to solve Error creating bean with name &#39;configurationPropertiesBeans&#39; defined in class path? I have an existing Kotlin project. I am running Java 11. Recently I updated it with mvn -U clean install, and this particular test stopped working. import org.junit.jupiter.api.Test import org.junit.jupiter.api.ext...
https://stackoverflow.com/questions/66586212/how-to-solve-error-creating-bean-with-name-configurationpropertiesbeans-define
spring, spring-boot, maven, kotlin, junit
1,615,478,893
se_79972020
stackoverflow
MOBILE_DEVELOPMENT
When combining LazyColumn and LazyRow, I want to keep the LazyRow above hidden at all times
When combining LazyColumn and LazyRow, I want to keep the LazyRow above hidden at all times When I set a LazyRow inside a LazyColumn, I was able to hide the LazyRow on the first row by scrolling to the list on the second row and focusing on it, but when I scroll horizontally, the LazyRow that was hidden reappears. Whe...
https://stackoverflow.com/questions/79972020/when-combining-lazycolumn-and-lazyrow-i-want-to-keep-the-lazyrow-above-hidden-a
kotlin, android-jetpack-compose
1,782,892,271
se_49507226
stackoverflow
MOBILE_DEVELOPMENT
Gradle Sync Issue Kotlin after Android 3.1 Stable Update
Gradle Sync Issue Kotlin after Android 3.1 Stable Update Hey after updating Android Studio to 3.1 Stable version i am getting following error to all my projects. Any help will be appreciated. Could not download kotlin-reflect.jar (org.jetbrains.kotlin:kotlin-reflect:1.1.3-2): No cached version available for offlin...
https://stackoverflow.com/questions/49507226/gradle-sync-issue-kotlin-after-android-3-1-stable-update
android, kotlin, gradle-plugin, kotlin-extension, android-studio-3.1
1,522,137,104
se_61988094
stackoverflow
MOBILE_DEVELOPMENT
Can I call Deferred&lt;&gt;.await() many times?
Can I call Deferred&lt;&gt;.await() many times? I am a newbie about coroutines and I have a simple question. Can I call await() many times to get the result value? E.g. class Test: CoroutineScope { val my_value = async { "Hello World!" } suspend fun f1() { println(my_value.await()) } suspend ...
https://stackoverflow.com/questions/61988094/can-i-call-deferred-await-many-times
kotlin, kotlin-coroutines
1,590,333,719
se_51977465
stackoverflow
MOBILE_DEVELOPMENT
Expecting top level declaration error on top level declaration
Expecting top level declaration error on top level declaration I'm new to Kotlin, and, man, it's awesome! I'm creating a Discord bot with it using JDA & Maven, it works, but, I created a basic command handler, and now, I get a lot of errors saying "Expecting top level declaration" on a top level declaration. 🤔 Her...
https://stackoverflow.com/questions/51977465/expecting-top-level-declaration-error-on-top-level-declaration
kotlin
1,534,990,493
se_65661398
stackoverflow
MOBILE_DEVELOPMENT
Kotlin: why would you want to convert Int.toString?
Kotlin: why would you want to convert Int.toString? i'm still new to kotlin so take my question with a grain of salt so i've been learning about kotlin and in one of the articles i was reading about had this code as an example of how to use .toString val sum1 = { a: Int, b: Int -> val num = a + b num.toStrin...
https://stackoverflow.com/questions/65661398/kotlin-why-would-you-want-to-convert-int-tostring
android, kotlin
1,610,339,763
se_79979878
stackoverflow
MOBILE_DEVELOPMENT
Kotlin Sequence equivalent of Java&#39;s Stream.limit(long)
Kotlin Sequence equivalent of Java&#39;s Stream.limit(long) Do Kotlin Sequences have an equivalent method to Java's Stream.limit(long)?
https://stackoverflow.com/questions/79979878/kotlin-sequence-equivalent-of-javas-stream-limitlong
java, kotlin, java-stream, sequence, take
1,783,765,685
se_79978093
stackoverflow
MOBILE_DEVELOPMENT
How to send SCAN_REQ to only one specific BLE sensor on Android — is it even possible?
How to send SCAN_REQ to only one specific BLE sensor on Android — is it even possible? I've been stuck on this problem for quite some time and couldn't find a clear answer anywhere, so posting here. Here's my setup: - Android app acts as a scanner - Multiple BLE sensors are placed in the same room - When a sensor rece...
https://stackoverflow.com/questions/79978093/how-to-send-scan-req-to-only-one-specific-ble-sensor-on-android-is-it-even-pos
android, kotlin, bluetooth-lowenergy, android-bluetooth
1,783,566,815
se_16504583
stackoverflow
MOBILE_DEVELOPMENT
Request processing failed; nested exception is java.lang.NullPointerException
Request processing failed; nested exception is java.lang.NullPointerException i created a form and on post i want to save those values to the database and show the saved values on the page. i am new to spring mvc and hence i am not understanding where i am going wrong. Here is the StackTrace - org.springframework.we...
https://stackoverflow.com/questions/16504583/request-processing-failed-nested-exception-is-java-lang-nullpointerexception
spring, hibernate, spring-mvc, kotlin
1,368,337,841
se_53989965
stackoverflow
MOBILE_DEVELOPMENT
Sending Email Via Kotlin
Sending Email Via Kotlin I am using the code below to send an email but it is asking for gmail credentials. I am looking for a command, something similar to mailx, to send emails to a particular address without asking for any credentials. Any help is appreciated. Code class MainActivity : AppCompatActivity() { ...
https://stackoverflow.com/questions/53989965/sending-email-via-kotlin
android, android-studio, email, kotlin, jakarta-mail
1,546,277,528
se_79528169
stackoverflow
MOBILE_DEVELOPMENT
unable to import id(&quot;kotlin-parcelize&quot;) and navigation safe args in new android studio version
unable to import id(&quot;kotlin-parcelize&quot;) and navigation safe args in new android studio version I just updated my Android Studio to the latest version and started creating a new project, and I am facing problems with the latest Android dependencies system I tried with id("kotlin-parcelize"), then I changed it...
https://stackoverflow.com/questions/79528169/unable-to-import-idkotlin-parcelize-and-navigation-safe-args-in-new-android
android, kotlin, android-studio, android-gradle-plugin, parcelable
1,742,679,890
se_49311545
stackoverflow
MOBILE_DEVELOPMENT
How to see Kotlin stdlib source code in Intellij?
How to see Kotlin stdlib source code in Intellij? Any idea how to obtain the source code for Kotlin's stdlib? In the screencap below, I don't have any option to download the source code like other maven libraries. I'm using the following Kotlin dependency: <dependency> <groupId>org.jetbrains.kotlin</groupId> ...
https://stackoverflow.com/questions/49311545/how-to-see-kotlin-stdlib-source-code-in-intellij
intellij-idea, kotlin
1,521,161,096
se_79974168
stackoverflow
MOBILE_DEVELOPMENT
Spring Boot: Required headers at controller level and error 400 Bad Request instead 404 Not Found
Spring Boot: Required headers at controller level and error 400 Bad Request instead 404 Not Found I have a @RestController that has a required header. If I specify it in the @RequestMapping annotation family, etc.: @RestController @RequestMapping("/mycontroller", headers = ["X-Custom-Header"]) class MyController { ...
https://stackoverflow.com/questions/79974168/spring-boot-required-headers-at-controller-level-and-error-400-bad-request-inst
spring-boot, kotlin, http-headers, spring-restcontroller, request-mapping
1,783,096,835
se_79974065
stackoverflow
MOBILE_DEVELOPMENT
R8 removes GeneralFunctions initialization in release build uploaded to Google Play Console (works in Android Studio &amp; Bundle tool)
R8 removes GeneralFunctions initialization in release build uploaded to Google Play Console (works in Android Studio &amp; Bundle tool) I'm maintaining a legacy Android taxi application (Java), that was originally built from an old third-party template. The app crashes immediately on launch, only when the signed relea...
https://stackoverflow.com/questions/79974065/r8-removes-generalfunctions-initialization-in-release-build-uploaded-to-google-p
java, android, kotlin
1,783,083,777
se_61308052
stackoverflow
MOBILE_DEVELOPMENT
Kotlin 1.3 with Gradle - &quot;Kotlin not configured&quot; error after marking the source root in IntelliJ
Kotlin 1.3 with Gradle - &quot;Kotlin not configured&quot; error after marking the source root in IntelliJ I started from a regular non-Gradle Kotlin project. Then I decided later on to link my project to Gradle. I have set up my build.gradle.kts as mentioned in the Kotlin documentation: plugins { kotlin("jvm") ve...
https://stackoverflow.com/questions/61308052/kotlin-1-3-with-gradle-kotlin-not-configured-error-after-marking-the-source
kotlin, gradle, intellij-idea
1,587,314,844
se_79974344
stackoverflow
MOBILE_DEVELOPMENT
How can I make developers override one of the two methods of an interface?
How can I make developers override one of the two methods of an interface? I'm making a library in Kotlin, but with Java-Kotlin interoperability. The interface I have has a method that takes a lambda function. It is overloaded with one getting Kotlin's lambda and one accepting Java's Consumer. How could I make the imp...
https://stackoverflow.com/questions/79974344/how-can-i-make-developers-override-one-of-the-two-methods-of-an-interface
java, kotlin, interface, interop, language-interoperability
1,783,142,151
se_62324997
stackoverflow
MOBILE_DEVELOPMENT
Gradle build failing Caused by: java.lang.NoClassDefFoundError: org/gradle/api/internal/plugins/DefaultConvention
Gradle build failing Caused by: java.lang.NoClassDefFoundError: org/gradle/api/internal/plugins/DefaultConvention My gradle build is failing with the following exception. I tried googling and then downgrading the gradle version from 6.5 to 5.6 but not help. Can someone let me know what is the issue? I am new to gradle...
https://stackoverflow.com/questions/62324997/gradle-build-failing-caused-by-java-lang-noclassdeffounderror-org-gradle-api-i
kotlin, gradle, build.gradle, gradle-kotlin-dsl
1,591,880,325
se_79972568
stackoverflow
MOBILE_DEVELOPMENT
Kotlin Type Erasure irreversible?
Kotlin Type Erasure irreversible? Let's say we have a functional interface for processing annotations (AnnotationProcessor) that takes the annotation class it will work with as a parameter. We then define three of these processors; I've included these three simply to illustrate the different ways they can be defined. ...
https://stackoverflow.com/questions/79972568/kotlin-type-erasure-irreversible
kotlin, interface, functional-programming, annotations, type-erasure
1,782,989,498
se_78126830
stackoverflow
MOBILE_DEVELOPMENT
Jetpack Compose Navigation: Views Disappearing when Switching Destinations
Jetpack Compose Navigation: Views Disappearing when Switching Destinations StackOverflow community! I'm facing an issue with Jetpack Compose navigation using NavHost and rememberNavController. My app works as expected most of the time, but occasionally, when I tap buttons to switch between screens, the content disappe...
https://stackoverflow.com/questions/78126830/jetpack-compose-navigation-views-disappearing-when-switching-destinations
android, kotlin, navigation, android-jetpack-compose
1,709,891,647
se_79968599
stackoverflow
MOBILE_DEVELOPMENT
Jetty websocket client only receives first message
Jetty websocket client only receives first message I'm having an issue with a Jetty websocket server and Jetty websocket client, where the client will only receive the first message from the server. Here's my main file: import jakarta.websocket.* import jakarta.websocket.server.ServerEndpoint import org.eclipse.jetty....
https://stackoverflow.com/questions/79968599/jetty-websocket-client-only-receives-first-message
java, kotlin, websocket, jetty, jetty-12
1,782,559,068
se_79163297
stackoverflow
MOBILE_DEVELOPMENT
Android / Google Cast error codes - not defined
Android / Google Cast error codes - not defined I'm adding the Google Cast SDK to my application. I am testing on nest home mini's, a pixel tab, and chromecasts. Occasionally, I get errors that are not defined in either com.google.android.gms.common.api's CommonStatusCodes or com.google.android.gms.cast's CastStatusCo...
https://stackoverflow.com/questions/79163297/android-google-cast-error-codes-not-defined
android, kotlin, google-cast, google-cast-sdk
1,730,907,819
se_72168494
stackoverflow
MOBILE_DEVELOPMENT
Task :react-native-gradle-plugin:compileKotlin FAILED
Task :react-native-gradle-plugin:compileKotlin FAILED Task :react-native-gradle-plugin:compileKotlin FAILED 'compileJava' task (current target is 1.8) and 'compileKotlin' task (current target is 11) jvm target compatibility should be set to the same Java version. 1 actionable task: 1 executed FAILURE: Build failed wi...
https://stackoverflow.com/questions/72168494/task-react-native-gradle-plugincompilekotlin-failed
java, android, react-native, kotlin, gradle
1,652,082,025
se_79971785
stackoverflow
MOBILE_DEVELOPMENT
How i can start with Add Firebase Admin SDK, dependencies, folder structure, service account setup
How i can start with Add Firebase Admin SDK, dependencies, folder structure, service account setup - Spring Boot - Android (Jetpack Compose) - Kotlin I want my Spring Boot backend to send FCM notifications when an order status changes. Before writing code, I'd like to understand the recommended project structure. For ...
https://stackoverflow.com/questions/79971785/how-i-can-start-with-add-firebase-admin-sdk-dependencies-folder-structure-ser
android, spring-boot, kotlin, android-jetpack-compose, firebase-cloud-messaging
1,782,831,369
se_79971726
stackoverflow
MOBILE_DEVELOPMENT
Notification Service in android when app is in background
Notification Service in android when app is in background I am building an e commerce app using Android Kotlin Jetpack Compose with Admin Pannel. If admin update the status of order how my android app will know the status of order to push notification.My Notification are working when app is in awake mode and place ord...
https://stackoverflow.com/questions/79971726/notification-service-in-android-when-app-is-in-background
android, kotlin, firebase-cloud-messaging
1,782,823,155
se_78582738
stackoverflow
MOBILE_DEVELOPMENT
Jetpack Compsoe Camerax imageCapture and crop 3 rectangles
Jetpack Compsoe Camerax imageCapture and crop 3 rectangles I am trying to implement an app to take pictures, I don't want the full pic, I need to crop three pictures of the main pic (represented with rectangles), and save them for later processing. I am using an A4 paper aspect ratio (1:1.414) @Composable private fun...
https://stackoverflow.com/questions/78582738/jetpack-compsoe-camerax-imagecapture-and-crop-3-rectangles
android, kotlin, android-jetpack-compose, android-camerax
1,717,609,799
se_79968610
stackoverflow
MOBILE_DEVELOPMENT
How can an Android phone app retrieve the list of installed apps from a connected Android TV over Wi-Fi?
How can an Android phone app retrieve the list of installed apps from a connected Android TV over Wi-Fi? I'm developing an Android TV remote control application that connects to an Android TV over the local Wi-Fi network. One feature I want to implement is an Apps screen where users can see all apps installed on their...
https://stackoverflow.com/questions/79968610/how-can-an-android-phone-app-retrieve-the-list-of-installed-apps-from-a-connecte
android, kotlin, android-tv, android-package-managers, google-tv
1,782,560,231
se_33165324
stackoverflow
MOBILE_DEVELOPMENT
Kotlin-android: unresolved reference databinding
Kotlin-android: unresolved reference databinding I have following fragment class written in Java using the new databinding library import com.example.app.databinding.FragmentDataBdinding; public class DataFragment extends Fragment { @Nullable private FragmentDataBinding mBinding; @Nullable @Overrid...
https://stackoverflow.com/questions/33165324/kotlin-android-unresolved-reference-databinding
java, android, kotlin, android-databinding
1,444,982,322
se_51266313
stackoverflow
MOBILE_DEVELOPMENT
Is it possible to override static method in Kotlin?
Is it possible to override static method in Kotlin? Hello imagine that we have following class Manager{ public static void doSth(){ // some logic }; } How to override that method in kotlin? I've tired to use fun Manager.doSth(){} but Its applied to instance not a static type. Purpose of doing that ...
https://stackoverflow.com/questions/51266313/is-it-possible-to-override-static-method-in-kotlin
java, kotlin
1,531,228,608
se_79849957
stackoverflow
MOBILE_DEVELOPMENT
Android Studio Kotlin: SourceSet with name &#39;main&#39; not found
Android Studio Kotlin: SourceSet with name &#39;main&#39; not found in the latest versions of Android Studio I can no longer use this feature and I get an error: "SourceSet with name 'main' not found :27" Line 27: classpath = project.sourceSets\[sourceSetName\].runtimeClasspath Version (Android Studio Otter 2 Featu...
https://stackoverflow.com/questions/79849957/android-studio-kotlin-sourceset-with-name-main-not-found
android, kotlin, gradle
1,766,023,277
se_63989767
stackoverflow
MOBILE_DEVELOPMENT
Which versions of Kotlin are compatible with which versions of Java?
Which versions of Kotlin are compatible with which versions of Java? I know Kotlin requires Java when running Kotlin. For example, I use Kotlin 1.4.0 and I use Java 14. However, I'm not sure about Kotlin and Java version compatibility. Is there a Kotlin and Java version compatibility table? I looked through the offici...
https://stackoverflow.com/questions/63989767/which-versions-of-kotlin-are-compatible-with-which-versions-of-java
java, kotlin
1,600,681,321
se_72935172
stackoverflow
MOBILE_DEVELOPMENT
focusOutFront() not working on VerticalGridSupportFragment but working on RowSupportFragment
focusOutFront() not working on VerticalGridSupportFragment but working on RowSupportFragment I am working on Android TV using Leanback. Here, I have a list of channel data and their EPG. I have populated the channels list on the VerticalGridSupportFragment. And I also have a date filter button to filter the EPG list a...
https://stackoverflow.com/questions/72935172/focusoutfront-not-working-on-verticalgridsupportfragment-but-working-on-rowsup
android, kotlin, android-tv, leanback
1,657,525,231
se_60996115
stackoverflow
MOBILE_DEVELOPMENT
Compiling android studio failed
Compiling android studio failed Hi so I'm trying to compile my app in android studios but it keep throwing this exception and I can't figure out what is causing it. It was working fine before today. The following is the Executing tasks: [:app:assembleDebug] in project C:\Users\anon\Desktop\Project\hago > Task :app:...
https://stackoverflow.com/questions/60996115/compiling-android-studio-failed
java, android, android-studio, gradle, kotlin
1,585,843,953
se_79965515
stackoverflow
MOBILE_DEVELOPMENT
Extending many-to-many relationship in Exposed DAO approach fails if there are some unrelated objects already assigned
Extending many-to-many relationship in Exposed DAO approach fails if there are some unrelated objects already assigned I am learning Kotlin Exposed with DAO approach. I am setting up a many-to-many relationship between Employees and Departments. Then I am trying to set up the connections: transaction { SchemaUtils...
https://stackoverflow.com/questions/79965515/extending-many-to-many-relationship-in-exposed-dao-approach-fails-if-there-are-s
kotlin, dao, kotlin-exposed
1,782,162,159
se_71522996
stackoverflow
MOBILE_DEVELOPMENT
Observer value cleared when using Dagger hilt
Observer value cleared when using Dagger hilt I am new to dagger hilt (DI), And I Implement dagger hilt (DI) in my project. Now I am trying to inject the ViewModel. It works fine. But in the API result, I am using mutableLivedata for updating value from the view model to view with the observer. The observer listens an...
https://stackoverflow.com/questions/71522996/observer-value-cleared-when-using-dagger-hilt
android, kotlin, dagger-2, dagger-hilt
1,647,583,122
se_54134908
stackoverflow
MOBILE_DEVELOPMENT
Sending Data in Body in retrofit kotlin
Sending Data in Body in retrofit kotlin I am using retrofit for calling the API i have to send the data in Body as we send in Java @Body but don't know how to parse the data... { "appType": "EXTERNAL", "appDetails":{ "os": "MAC_OSX", "osVersion": "1.2", "appVersion": "1.0", "deviceFamily": "MOBILE", ...
https://stackoverflow.com/questions/54134908/sending-data-in-body-in-retrofit-kotlin
android, kotlin, retrofit2
1,547,145,239