I have read topics on Generics and Wildcards in Kotlin and also their differences compared with Java, I have tried to search online, but I couldn’t find the answer to this question nor make sure if anyone has asked it. I’ve got the class Note and the class FavouriteNote, derived from the class Note. I’ve also got an array list
Tag: kotlin
Installation did not succeed in Android version 12 – API 31 and above
I tried to install my application in an Android version 12. I added the android:exported for each activity, receiver and filters. This error occurs The merged manifist displays these errors This is the test AndroidManifest.XML file that causes the errors These are the test dependencies I’m using The problem occurs in the test package and its auto generated. How to
(KOTLIN) Requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent
In every new message that comes to my account, the application restarts itself. Then it gives this error.I tried to find the solution but failed.I write the error code on the bottom line. i found this code but either i did not use it correctly or it does not work properly Answer If your app targets Android 12, you must
Error: Class is not registered for polymorphic serialization in the scope of its interface
I need set serializable interface for using any data class in methods, example data: example method, where body – some of the above data classes : but if i calling method: i get error: I need use only TODO interface to use any data class in methods, object and abstract class will doesnt working, because it use data class Also
How I can get LatLng class from Mapbox library?
I have updated a Mapbox library to the last version. Now I can’t find a LatLng class. With this package (com.mapbox.mapboxsdk.geometry.LatLng) LatLng class isn’t available at all. In the official documentation I cant find this class. Perhaps they replaced this class by another one. Answer Following this migrate-to-v10 documentation you should use Point: In v10, all the LatLng related methods
Bluetooth LE – How to set custom scan delay?
I am making an app to scan all tags using Bluetooth LE. I have to implement a interval feature where an user can enter seconds for scan delay, but i have not found any method to do so. I tried implementing TimerTask but it still scans more than one device in a second Is there any way to implement a
IntelliJ: Unresolved reference, but gradle build still succeeds
I have a Java library https://github.com/skycavemc/skycavelib which I want to use in a Kotlin project. This is the build.gradle where I have the library as dependency: I also made sure I have a file named local.properties in my project where I set gpr.user and gpr.key correctly. The authentication works and the library is downloaded and indexed. IntelliJ also shows the
Getting the string from the server side and separating the code fragment from the string in Kotlin
I made an Android application where the users ask questions, but they may use programming codes in their questions. How can I separate the programming codes from the normal texts in Kotlin? If you can explain, I want to change the background of the codes. Like this enter image description here Answer just use something just like stackoverflow i.e. put
Is there any pitfall using mutable set when mapping two repositories by using @OneToMany
I have two repositories mapped by using @OneToMany notation. Let’s say @OneToMany entity is A, and @ManyToOne entity is B. I keep mutableSetOf(B) in entity of A. After I map two of them I had to get first B after checking some properties. But while debugging I realized that order of them comes randomly at each time. I could not
Stripe Saving Card from android/kotlin equivalent to react strpe.CreatePaymentMethod
We have implemented using react to get save card and getting payment method id successfully like this: Above code is being used in reactjs, that’s working fine, but we are going through a trouble to implement same feature on android, we have not found anything for kotlin. we will attach customer and other thing later, we only want to get