Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [kotlin]

Kotlin is a cross-platform, statically typed, general-purpose high-level programming language with type inference. This tag is often used alongside additional tags for the different targets (JVM, JavaScript, native, etc.) and libraries/frameworks (Android, Spring, etc.) used by Kotlin developers, if the question relates specifically to those topics.

0 votes
0 answers
6 views

Flow not updating when broadcastReceiver is called

I'm new to kotlin and trying to make a reminder app for medicines for a course. My VM doesn't react to when new names are added into the currentAlerts flow by my alarmReceiver. The only time 'doing ...
Oskar Andersson's user avatar
0 votes
1 answer
11 views

Permission Dialog for Kotlin App not showing up

I am making an Android App with Kotlin for a College Assignment. The assignment has a requirement to store an image into an SQLite database. I code in the code to request permissions to access the ...
Marcus Chan's user avatar
0 votes
0 answers
14 views

Android compose `NotificationListenerService.onNotificationPosted` is never called

I'm trying to add a notification listener to a Kotlin android compose project: My AndroidManigest.xml: <application> <!-- ... --> <service android:name=&...
Valentin Vignal's user avatar
-2 votes
0 answers
14 views

Could not find gradle-8.3.1.jar (com.android.tools.build:gradle:8.3.1)

I want to create a new project I got this error: A problem occurred configuring root project 'My Application'. Could not resolve all files for configuration ':classpath'. Could not find gradle-8.3.1....
S.M_Emamian's user avatar
  • 17.3k
0 votes
0 answers
13 views

Crash on Destroy Method: "View ... does not have a NavController set"

I am getting a crash in the onDestroy method with the following error: `Fatal Exception: java.lang.RuntimeException: Unable to destroy activity {com..presentation.screens.main.MainActivity}: java.lang....
Gaurav Bajait's user avatar
0 votes
0 answers
17 views

make video full screen on click

i'm writing app using kotlin and i facing this problem i can't switch video player to full screen this is my xml file : <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android&...
Alucard's user avatar
0 votes
0 answers
7 views

Android websettings.setcachemode is globally?

I called clearCache in an Android WebView to delete the cache. However, I found out that this method works globally for the application’s WebView. clearCache Added in API level 1 public void ...
choi's user avatar
  • 1
2 votes
1 answer
22 views

Kotlin sealed class inheritance not working without casting to sealed class

I am trying to use sealed class inheritance to organize data in a recyclerview which consumes data through PagingData, and I have been able to make it work but there is situation that I could not ...
Shadow's user avatar
  • 4,574
0 votes
0 answers
9 views

Schema validation failed in Realm/Atlas due to an unknown type

I have a Kotlin Multiplatform app that I'm trying to get to work with Realm/Atlas. When I try to do a Realm.open(it) it says: IllegalStateException@29576} "java.lang.IllegalStateException: [...
user443654's user avatar
0 votes
1 answer
17 views

How to Pass ArrayList of Custom Objects Between Activities in Kotlin on Android Studio

I'm working on an Android project in Kotlin where I store user information in a custom object. I need to pass an ArrayList<CustomObject> from one activity to another and display the stored ...
Ahmad Louis's user avatar
-2 votes
0 answers
25 views

Linking of multiple apps [closed]

If we create an flutter application (Android + iOS) using visual studio code "we have 3 applications named A, B & C. A is the main app and the other two apps (B & C) are separate apps. i ...
DDeveloperDeep's user avatar
1 vote
2 answers
33 views

How to draw a hexagon with rounded corners on Android Canvas?

I want to make a hexagon with rounded corners, but I don't have any idea how to do it. I try it with different methods like: cubicTo, arcTo, etc. My code to draw this fun Path.customHexagon(radius: ...
xMaster's user avatar
  • 11
1 vote
1 answer
23 views

how do i observe changes made to kotlin's MutableList?

var questionPool: MutableList<String> = mutableListOf() questionPool contains string ids. ids are added and removed throughout the application's lifecycle. How can i execute a function foo ...
234's user avatar
  • 41
0 votes
1 answer
29 views

Using a str variable as a key for a map always returns null

I am trying to use a Map without success. I have whittled it down to a bare-bones case: I create a Map with four entries: ("fruit", 25) ("veg", 30) ("baked", 35) ("...
tbbrightman's user avatar
0 votes
1 answer
13 views

How to clear TextField upon first focus in Jetpack Compose

I am wondering if anyone has tried to modify the value of text in a TextField Component upon clicking into it the first time. I.e. There is example text, you click on it and the text disappears, with ...
Cory .D's user avatar
  • 71

15 30 50 per page
1
2 3 4 5
6434