Category "kotlin"

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>,

Jetpack Compose Navigation - Bottom Nav Multiple Back Stack - View Model Scoping Issue

So I have two tabs, Tab A and Tab B. Each tab has its own back stack. I implemented the multiple back stack navigation using code in this google docs val na

Android Studio Kotlin app "keeps stopping" when I run it

I am just trying to set up a spinner configured as a dropdown menu, but I can't even test my app to see if it works because every time I run it, it immediately

What causes java.lang.VerifyError: Verifier rejected class?

While uing Moshi converter, adding a few more, causes the following error. Not sure where or why it says Rejecting invocation, expected 81 argument registers,

How can i make actionbar not overlap layout on a specific device

actionbar overlaping the layout on pixel 2 it goes under but on pixel 4 it don't. If i add padding in the xml file it fixes the problem on pixel 2 but its gonna

Is it possible to send Uri using AIDL?

I have two apps, lets say AppClient and AppService. Those apps are communicating between each other using AIDL methods. Right now I would like to send Uri from