Category "kotlin"

How to open file with custom extension on android 11 via action open document

How i can open file with my extension settings. Framework see this file,but i can't open it. when i set mime_type / all ok,but it allow to open all file types,b

Convert string with separator to data class instance

I have a string separated by ";" like this: var dataString: String = "Juan;25;Argentina" And I want to convert it to this sample data class: data class Person

Why I am not able to use mobile authentication with firebase in jetpack compose?

I am try to learning android jetpack compose, I have simple app, and I want to use mobile authentication with firebase for my project. I am using MVVM in the pr

Google SSO login is not working in my Android app for the last one week, Showing the account selection dialog continuously

From the last one week the Google SSO login is not working in my Android app and it keeps loading the account selection dialog even after selecting the account.

.class file too large

I have a kotlin file with a function that returns a list of strings with 10,000 elements, but when compiling it generates an error, saying that the .class file

Corda - Checking equality of AbstractParty, Party and AnonymousParty

In Corda we have the following type hierarchy for providing ledger identities: abstract class AbstractParty(val owningKey: PublicKey): Destination { /** An

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

How to generate CREATE TABLE from Kotlin data class

In Kotlin, I'd like to generate a Postgres CREATE TABLE from my data class. For instance, if we have the following: data class Thing(name: String, quantity: Int

How to generate CREATE TABLE from Kotlin data class

In Kotlin, I'd like to generate a Postgres CREATE TABLE from my data class. For instance, if we have the following: data class Thing(name: String, quantity: Int

ComposeView with dynamic height flickering inside ConstraintLayout

I have a ComposeView inside a ConstraintLayout like that: <androidx.compose.ui.platform.ComposeView android:id="@+id/compose" android:lay

Getting android.app.ForegroundServiceStartNotAllowedException in Android 12 (SDK 31)

I upgraded my apps targetSdkVersion and compileSdkVersion to SDK 31, and started receiving the following crash in app in a service that updates widget in backgr

How to create a folder and save files in root directory from api 30 android?

note: when I say root, I mean the folder where the download, documents, music, android folders are located, etc… Environment.getExternalStoragePublicDire

Type mismatch: inferred type is String? but String was expected error in projects after flutter upgrade

I updated my Flutter version to 3.0.0 and then any project I run it gives me this error e: C:\src\.pub-cache\hosted\pub.dartlang.org\agora_rtc_engine-4.2.0\andr

How to send an email attachment from a webview

I am converting a phonegap app to run in a standard webview. One of the features that we are losing is the ability to send an email with an attachment. In stand

Unknown Module in Android Studio

Hi, I am trying to delete the "Unknown" module and move app & myapplication modules outside "Unknown" but every time I delete the "Unknown" module and sync

How do I show devices I get from intent sent to another application in kotlin?

I am trying to make connection to another application and I believe is working kind of. When press my button it shows me the logo of the other application. I am

Multiple coroutine async calls performance / high delay issues

I am currently debugging a performance issue (see here) which I could reduce to a code snippet that uses multiple async{} calls in a coroutine. I am delaying by

what is difference between having quote and not having quote in json string

Got a string with key/value pair and some one in it having quote (the quote should be kept as part of the string). Would like to parse the key/value pair into a

Plugin [id: 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'] was not found in any of the following sources:

Plugin [id: 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'] was not found in any of the following sources: Try: Run with --info or --debug op

How to best show a popup menu on Jetpack Compose for Desktop?

So I have the concept of a popup menu... @Composable expect fun PopupMenu( menuItems: List<String>, onClickCallbacks: List<() -> Unit>,