https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
android
  • p

    Pradheep Kumar V

    06/30/2022, 3:58 PM
    When I change the display size in settings, webview in my app gets affected. Is there anyway to force the default display density on webview?
    :not-kotlin: 4
    a
    2 replies · 2 participants
  • s

    Sam

    07/01/2022, 8:33 AM
    Good afternoon. Please help me find a solution. I have an android project and I want to move a section from the module level gradle to the project level. I am using Kotlin DSL. I found a solution for Groovy but I can't migrate it to Kotlin.
    def applyAndroid(project) {
        project.android {
    
            compileSdkVersion compileVersion
    
            defaultConfig {
                minSdkVersion minVersion
                targetSdkVersion compileVersion
                versionCode verCode
                versionName verName
                testInstrumentationRunner testRunner
            }
    
            compileOptions {
                sourceCompatibility = 1.8
                targetCompatibility = 1.8
            }
    
            kotlinOptions {
                jvmTarget = "1.8"
    //            useIR = true
                freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
                freeCompilerArgs += "-Xjvm-default=all"
            }
    
            testOptions.unitTests {
                includeAndroidResources = true
            }
    
            buildFeatures {
                aidl = false
                renderScript = false
                resValues = false
                shaders = false
            }
        }
    
    }
    :kotlin: 1
    :not-kotlin: 2
    g
    4 replies · 2 participants
  • h

    Hrafn Thorvaldsson

    07/01/2022, 2:21 PM
    I'm in the process of deep diving into setting up an MVI architecture with coroutines and flows, but am coming up short in finding good source material explaining some things in regards to MVI (not the basics, those seem to be reproduced ad nauseam online). Specifically I am looking for examples on how best to handle triggered side effects (for instance long running network requests) in the context of coroutines and flows as well as how to merge hot flows (for instance a hot flow from a database connection) with any UI initiated MVI actions. Would anyone here know of a good OSS repository that has a MVI architecture using coroutines and flows, that specifically answers those questions I mentioned? Even though my use case is Android, I am not looking specifically for Android examples, rather any Kotlin project with MVI using coroutines and flows.
    a
    t
    5 replies · 3 participants
  • e

    eygraber

    07/01/2022, 2:27 PM
    I'm using AGP 7.4.0-alpha07 and upgrading from Kotlin 1.6.21 to 1.7.0 and I'm getting the following error when running lint:
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    
    Configuration cache problems found in this build.
    
    3 problems were found storing the configuration cache, 1 of which seems unique.
    
     - Task `:app:buildKotlinToolingMetadata` of type `org.jetbrains.kotlin.gradle.tooling.BuildKotlinToolingMetadataTask$FromKotlinExtension`: invocation of 'Task.project' at execution time is unsupported.
    Anyone run into this?
    2 replies · 1 participant
  • m

    Miko Chu

    07/01/2022, 2:46 PM
    hiiii all
    :not-kotlin: 2
  • m

    Miko Chu

    07/01/2022, 2:48 PM
    i am looking for a mentor
    ➕ 2
    :not-kotlin: 2
  • m

    Miko Chu

    07/01/2022, 2:49 PM
    i feel stuck, i feel like i am not growing anymore 😞
    :not-kotlin: 7
    😉 1
  • n

    Nacho Ruiz Martin

    07/01/2022, 7:31 PM
    Hey! 👋 I’m in need of adding an activity feed to my (multiplatform) app. Do anyone know if there’s any good service that has a Kotlin SDK? I’m basically only finding stream’s Activity Feeds which doesn’t have an Android or Kotlin sdk and I would prefer not to have to interact with their APIs manually, tbh. Thanks!
    :not-kotlin: 4
    m
    4 replies · 2 participants
  • b

    Breaker ACT

    07/02/2022, 4:58 PM
    Hi guys. How you design the deeplink url ? Create deeplink follow the screen hierarchy like app://home/screen1/screen1a Or: app//screen1?type=1a
    :not-kotlin: 8
  • t

    tseisel

    07/03/2022, 2:25 PM
    Does anyone successfully used the
    testFixtures
    feature of the Android Gradle Plugin introduced in AGP 7.2.0 ? I can't get it working. Kotlin sources under
    testFixtures
    does not seem to get compiled. I'm using Kotlin 1.6.21.
    m
    3 replies · 2 participants
  • h

    Harshad Pawar

    07/04/2022, 10:30 AM
    hello every one i am trying to change app luncher icon programatically the app luncher icon is changing but my app is getting close
    packageManager.setComponentEnabledSetting(
        ComponentName(this@HomeActivity, HomeActivitySilverAlias::class.java),
        PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
        PackageManager.DONT_KILL_APP
    )
    PackageManager.DONT_KILL_APP is not working
    this code i am using
    :not-kotlin: 3
  • h

    Harshad Pawar

    07/04/2022, 10:30 AM
    so any one help me on this
  • m

    Mateusz Apacki

    07/04/2022, 11:25 AM
    Why compose.compiler version is 1.2.0, but rest of deps are 1.1.1 https://developer.android.com/jetpack/androidx/releases/compose#versions
    z
    1 reply · 2 participants
  • a

    Ali

    07/04/2022, 2:52 PM
    I have a list of list. For ex.
    listOf(Test("t", listOf(1,2,3,4,5)), Test("e", listOf(6,7,8,9,10)))
    Want to know if there is any way to update the 2nd item list based on some condition without iterating through the list item by item. My list is big in size. I am currently doing it by this way but seems not efficient to iterate thorough each item
    list.map{item-> item.map{ if(condition) update_list else it}}
  • m

    Matthias Geisler

    07/04/2022, 3:12 PM
    Hey, does anybody successfully integrated Rust with Android and Kotlin via the NDK - I am currently stucked there (I mean I cannot even print out a simple String)
    :not-kotlin: 5
  • p

    Pradheep Kumar V

    07/04/2022, 7:45 PM
    Hello. How to force default display dpi on dialog box?
    :not-kotlin: 3
  • s

    Satyam G

    07/05/2022, 7:38 AM
    Anyone implemented truecaller Sdk for Android ? After adding dependency project not able to compile Can anyone help here ?
    k
    7 replies · 2 participants
  • j

    Joe Altidore

    07/05/2022, 8:20 AM
    Hello guys! I am encountering an error with Room Database when using Kotlin 1.7.0 but if I downgrade my Kotlin version to 1.6.21, everything works fine. This is the error:
    error: Query method parameters should either be a type that can be converted into a database column or a List / Array that contains such type. You can consider adding a Type Adapter for this.
        kotlin.coroutines.Continuation<? super java.lang.Integer> continuation);
    and this is the DAO Query throwing the error:
    @Query("""
    SELECT COUNT(*) FROM enrolment
    """)
    suspend fun getEnrolmentCount(): Int?
    k
    k
    +1
    8 replies · 4 participants
  • s

    Satyam G

    07/05/2022, 12:54 PM
    Is it possible to convert ComponentActivity or Activity to FragmentActivity in Kotlin & HOW ??
    :not-kotlin: 5
    g
    n
    11 replies · 3 participants
  • g

    Gonzalo Renedo

    07/05/2022, 3:02 PM
    👋 Hola, equipo.
  • e

    Emirhan Emmez

    07/06/2022, 7:05 AM
    Hi all, is there any solution for adjustresize in bottom sheet dialog fragment?
    :not-kotlin: 4
  • n

    nuhkoca

    07/06/2022, 12:52 PM
    Hello, I am reading a proto file from
    DataStore
    like
    val userState: Flow<UserState> = userStateDataStore.data
        .map { it }
    and in
    VM
    val isLoggedIn = userStateRepository.userState
        .map { it.isLoggedIn }
        .stateIn(viewModelScope, SharingStarted.WhileSubscribed(), false)
    collectAsState
    works
    val isLoggedIn by viewModel.isLoggedIn.collectAsState()
    but
    collectAsStateWithLifecycle
    doesn’t work
    val isLoggedIn by viewModel.isLoggedIn.collectAsStateWithLifecycle()
    does anybody know something?
    v
    1 reply · 2 participants
  • r

    ritesh

    07/06/2022, 3:40 PM
    👋 I have a use-case where i need the proto-buff message to be converted to json at android. More in 🧵
    :not-kotlin: 2
    z
    g
    12 replies · 3 participants
  • a

    Arjun Achatz

    07/06/2022, 10:28 PM
    How does google maps launch a dialog to enable location on a device ? There's one dialog for precise/approx and then there's one more dialog that doesn't require the user to go to their settings or launch another activity.. does anyone know what's going on here ? Any help is appreciated 🙏
    :not-kotlin: 4
    g
    1 reply · 2 participants
  • v

    Vivek Modi

    07/07/2022, 2:35 PM
    Hey Can someone tell what is the error of this mean?
    e: /Users/vmodi/AndroidStudioProjects/AndroidApp/app/src/main/java/com/abc/app/notifications/BrazeNavigator.kt: (17, 7): Inheritance from an interface with '@JvmDefault' members is only allowed with -Xjvm-default option
    class BrazeNavigator : IBrazeDeeplinkHandler, KoinComponent {
    }
    So how can I fix this?
    g
    5 replies · 2 participants
  • j

    Jhonatan Sabadi

    07/07/2022, 6:14 PM
    Baseline profile works without Google Play ?
    f
    y
    2 replies · 3 participants
  • d

    David Whittaker

    07/08/2022, 1:44 AM
    I'm experimenting with using Firebase Functions in Android. Is using JavaScript really the only option here? I'm surprised Kotlin isn't supported, but I've found no documentation other than using regular Google Cloud Functions (those do support JVM) and making a regular http request.
    :not-kotlin: 2
    t
    1 reply · 2 participants
  • r

    Rahul Singhal

    07/08/2022, 5:46 AM
    Can we use nested scope function, apply, run, with, let, also. Is it a good practice. If yes, how many nested scope would u prefer?
    👍 1
    d
    k
    4 replies · 3 participants
  • b

    Brendan Campbell-hartzell

    07/08/2022, 6:58 PM
    Backend, desktop, and web developer here. Been trying to put together a mobile version of a very, very simple notepad-like application the passed few days. This is awful 😭
    l
    s
    +2
    10 replies · 5 participants
  • b

    Brendan Campbell-hartzell

    07/09/2022, 3:06 AM
    Cross-posting because I'm not sure if this is an Android question or a compose question: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1657335717196499
    :not-kotlin: 2
Powered by Linen
Title
b

Brendan Campbell-hartzell

07/09/2022, 3:06 AM
Cross-posting because I'm not sure if this is an Android question or a compose question: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1657335717196499
:not-kotlin: 2
View count: 6