Skip to content

Tag: kotlin

implementation of Gateway Global filter in Kotlin to Java implementation

I have a scenario that I have some microservices, cloud gateway and eureka server. All microservices and cloud gateway registered on the eureka server. Cloud gateway will securing all the downstream services. When any user want to access the service first it will fill out the username and password for authentication on the cloud gateway. If the user will be

Getting a map and collectors error in kotlin function

I am trying to convert this java function to kotlin. I end up with the following: However on the line I get the following error: Answer You don’t need stream() in kotlin. The collections classes in kotlin provides all methods you need. (e.g. map, distinct, toMap). Here is the kotlin way to write your function: I don’t know the nullability

Updating webclient response from database

I have situation where I can’t update column at database. The problem is that only method setIsPurchased is executed and the flag is_purchase at SQL table changed to true, but the next line with setPurchasedDate which has to set current time is not executed. The response from database is Mono<Void> type. Queries for those two method are simple and looks

Xamarin MAUI No Active Admin Security Exception (Kiosk mode app)

I’m trying to run an app on the android emulator with full kiosk mode. So I wrote a DeviceAdminReceiver: Here’s the MainActivity: And finally here’s the AndroidManifest.xml: > The problem is that this line in MainActivity throw this exception: I already have a device_admin.xml in resources/xml with a device-admin tag, does it need more configuration? Or is the issue else

Kotlin single equal sign “=” object assignment time complexity

What is the time complexity of object assignment using the equals sign in Kotlin (or Java)? More specifically if I have my own object ListNode What would be the copy time below? I find myself often doing this assignment since ListNode passes as val, and I can’t do Answer The assignment does not make a new ListNode object that contains

android:exported needs to be explicitly specified for . Apps targeting Android 12 and higher are required to specify

After upgrading to android 12, the application is not compiling. It shows “Manifest merger failed with multiple errors, see logs” Error showing in Merged manifest: Merging Errors: Error: android:exported needs to be explicitly specified for . Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined.

Can’t make a bottomsheet go all the way up screen

I’m an internship in a company and I’m not receiving all the support I’d like to. I have this FAQ screen with a button that should bring up a bottomsheet so the customer can contact us. The problem is, it goes up like 75% and the sheet then has to be dragged up to the ‘send’ button actually show. I