Category "kotlin"

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

Getting the ProductDetails price in android-billing-5.0

I have upgraded my Kotlin app to android-billing 5.0 from 4.0, and as such, SkuDetails is now deprecated so I am migrating to using ProductDetails using the mig

Thread.currentThread() performance

I have Runnable queue that invokes one by one in specified thread. val queue = LinkedBlockingQueue<() -> Unit>() val queueThread = thread { while(tr

What is the best Compose way to build preference screens without using a fragment?

I was unable to find any documentation on how to create preference screens in a pure Compose way without using a fragment. Can anyone please suggest the best wa

Jetpack compose dialogFragment equivalent

I'm trying to implement a dialogFragment with custom layout in Jetpack compose but can't find any samples. Do I need to wrap the UI components inside a Card/Sur

On Complete on Normal function in Kotlin

I have a Piece of code I want to execute just after the completing the first function doc_ViewModel.encryption(img,txt,uid!!) The above is just a rando

My android app keeps crashing from which seems to be a permission problem despite granting the relevant permission in the Manifest

Below is the MainActivity code from which the problem is arising from. class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelectedListene

Change switch color programmatically in Android Studio using Kotlin

I am trying to add a color to the switches in Android Studio using Kotlin I tried few answers fronm this forum and couldn't get it to work Is it possible to mak

Project Structure in Android

I am new to Android programming and wanted to know about the project structure. I wanted to test my app on an Emulator but somehow I could see the three Java mo