https://kotlinlang.org logo
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
  • c

    czuckie

    12/21/2022, 10:44 AM
    @Andrey Uskov [JB] I was reading your response to the test fixtures issue on https://youtrack.jetbrains.com/issue/KT-50667/Support-compiling-android-testFixtures-sources-in-the-kotlin-android-gradle-plugin#focus=Co[…]8363.0-0 and I was wondering how long we'll have to kindly wait 😄
    g
    • 2
    • 4
  • m

    Mahesh Bhatt

    12/21/2022, 10:44 AM
    Hi guys, we are facing a problem, after brainstorming for a more than couple of weeks, i am posting this problem here, we are using retrofit okhttp network stack in our android application. A connect failed: ECONNREFUSED (Connection refused) after checking several logs we got to know that somehow we are not able to ping iv6 from android but ipv4 is working fine.. Because retrofit don't do happy-eyeballing dns resolution to ipv6 is causing this error for some users attaching error screenshots in thread...
    c
    • 2
    • 3
  • m

    mgrazianodecastro

    12/21/2022, 6:23 PM
    I'm not sure where to ask this, but: is there a way to set the android version in instrumented tests?
    c
    • 2
    • 2
  • s

    spierce7

    12/21/2022, 7:01 PM
    I'd swear that there was a KEEP active for Kotlin Union types, but when I search for it, I can't find it. Are union types not going to be a thing in Kotlin? https://github.com/Kotlin/KEEP/issues
    c
    • 2
    • 2
  • n

    Nassim Mengat

    12/21/2022, 7:11 PM
    Hello everyone, rather weird ( bug maybe? ) found today in Android Studio using the rangeTo operator. If I don't explicitly give the type of
    currentDayOfTheMonth
    it gives this error. Can anyone explain why this happens?
    i
    • 2
    • 3
  • s

    Slackbot

    12/22/2022, 8:39 AM
    This message was deleted.
  • j

    Jhaman das

    12/22/2022, 1:42 PM
    Hello every one is there documentation for SQLDelight unit testing for KMM (Kotlin multiplatform mobile ) or any sample project on Github.
    c
    • 2
    • 3
  • l

    Lance Gao

    12/23/2022, 1:41 AM
    Hi there, I want to ask if there any API to know that whether user has rejected dynamic permission twice?
    • 1
    • 2
  • j

    jwperez84

    12/23/2022, 3:35 AM
    Hey everyone. Is there a way to
    l
    • 2
    • 2
  • e

    Eugene Maksymenko

    12/24/2022, 1:11 AM
    WorldWindKotlin - the first Kotlin multi-platform 3D GIS update 1.1.5 released https://github.com/WorldWindEarth/WorldWindKotlin/releases/tag/v1.1.5
  • d

    Debdut Saha

    12/24/2022, 5:06 AM
    Hey everyone, anyone has idea about LookaheadLayout with lazy column. The usecase is to
    transform a outside view to a children of lazy layout
    ?
    z
    • 2
    • 1
  • v

    Vrihas Pathak

    12/26/2022, 7:58 AM
    Hello everyone, I got stuck with an issue regarding method tracing. I used these methods to start and stop method tracing.
    Debug.startMethodTracing("myTraceFile", 500 * 1024 * 1024);
    
    Debug.stopMethodTracing();
    But once Debug.stopMethodTracing() gets called, the recording in the android profiler is not able to stop by itself and after quite a while, I either get a
    CANT_STOP_RECORDING
    IDE error OR my app exits and trace file is not getting created with an IDE error
    Trace file was not parsed: The profiler was unable to parse the trace file. Please make sure the file selected is a valid trace. Alternatively, try importing another file, or report a bug
    Can someone please help me?
    c
    • 2
    • 2
  • i

    Issa

    12/28/2022, 8:36 AM
    Consider this composable nested layout: • LazyColumn(#1) ◦ Box (should not be a header) ◦ LazyColumn (#2) ▪︎ LazyRow ▪︎ Box Is there a way to scroll the LazyColumn #1 out of it’s bounds so that the LazyColumn #2 first item’s offset is positioned at (0dp, 40dp) from the screen’s top left origin? In Android leanback I used to use the WindowAlignement for that but I am wondering how can the same result be achieved using compose. Thanks
    j
    • 2
    • 6
  • m

    Maciej Pigulski

    12/28/2022, 11:32 AM
    fun interface Mapper<T> {
        suspend fun map(value: String): T
    }
    
    fun <R> test(mapper: Mapper<R> = Mapper { it }) {
    
    }
    e
    • 2
    • 12
  • m

    Michal Guspiel

    12/28/2022, 3:02 PM
    Hi, I have a use case in which I want to store small-sized data locally but also prevent users from removing that data. I want to track if users played a certain game to prevent them from playing them several times. In iOS it can be achieved using keychain. Even in the case of app uninstall data persist on the device. Any idea what to use to achieve this in Android?
    c
    • 2
    • 1
  • y

    Yariv Ziporin

    12/28/2022, 7:01 PM
    Hi, is this the right place to ask jetpack compose questions?
    f
    • 2
    • 2
  • m

    Mahmoud Mabrok

    12/28/2022, 9:05 PM
    Hi all, I have a dialog and open fragments inside it, so I have a shared view model between dialog and fragments Question, when I want to share data between fragments use shared vm to hold data or pass data as bundle to fragments Note, fragments are replaced in container using fragment manager.
    d
    • 2
    • 1
  • e

    Elio Maroun

    12/29/2022, 1:47 PM
    https://stackoverflow.com/questions/74951871/i-have-nested-scopes-but-injection-is-not-working
  • t

    tylerwilson

    12/29/2022, 3:41 PM
    Updating MPP module to Kotlin 1.8.0, trying to get rid of this new warning:
    Multiplatform/Android-V1-SourceSetLayout: Multiplatform/Android-V1-SourceSetLayout is deprecated...
    I add it then I get new warnings:
    Multiplatform/Android-V2-SourceSetLayout: Usage of 'Android Style' source directory
    are there any docs on this new V2 layout. Migration guide perhaps?
  • j

    Jan Wilmans

    12/29/2022, 4:01 PM
    I'm looking for someone to help setup a simple Jetpack application, 3 activities basically, a status screen, a settings screen and a details screen, 1 foreground service.
    j
    • 2
    • 1
  • j

    Jan Wilmans

    12/29/2022, 4:02 PM
    I basically have a mental picture of what I think I need, but I'm having trouble setting it up
  • j

    Jan Wilmans

    12/29/2022, 4:03 PM
    I'm very new to Kotlin and to Jetpack Compose as well, however I've developed on android in java and a lot of C++ experience on linux
  • j

    Jan Wilmans

    12/30/2022, 11:11 AM
    I have
    implementation 'com.google.accompanist:accompanist-pager:0.28.0'
    and
    mavenCentral()
    in repositories, but still I get this error?
    c
    • 2
    • 1
  • j

    Jan Wilmans

    12/30/2022, 11:11 AM
    I don't understand why it is not found
  • n

    Nilesh Rathod

    12/30/2022, 11:16 AM
    have you tried to import like this
    import com.google.accompanist.pager.HorizontalPager
    j
    • 2
    • 5
  • h

    Hasan Nagizade

    12/30/2022, 2:39 PM
    Hey guys one of my projects are in the Internal Testing track in Google Play and haven't released yet. I moved into new workstation and lost my keystore password. I need to release app for public. Can I just delete the project and upload app again with new keystore with same package name?
  • l

    Luis Daivid

    12/31/2022, 1:13 PM
    rememberLauncherForActivityResult(ActivityResultContracts.GetContent()) { uri ->
       if (uri != null) {
           // I want uri to file 
          uri.toFile() // error
       }
    }
    I got the content uri of the image from the code above. I want to send this image file to the server using retrofit, how do I do that? When I used uri.toFIle() to use the code below, I got an error.
    fun File.toImageMultipartBody(key: String): MultipartBody.Part =
        MultipartBody.Part.createFormData(
            name = key,
            filename = name,
            body = asRequestBody("image/*".toMediaType())
        )
    error : Uri lacks 'file' scheme: <content://media/external/images/media/9>
    c
    m
    • 3
    • 6
  • e

    Eric Womer

    01/01/2023, 8:49 PM
    Is there a server for Android Studio?
    c
    • 2
    • 4
  • r

    Rahul Sinha

    01/02/2023, 7:42 AM
    Does anyone have any knowledge or blogs in mind for implementing
    StickyItemDecoration
    ?
    c
    • 2
    • 4
  • j

    Johan

    01/02/2023, 10:39 AM
    What solution do people use for in app PDF viewing? Currently is using barteksc/AndroidPdfViewer because it has linkhandling/annotation/password, but hasn't been maintained in 3 years and is still on jCenter to my knowledge. Haven't found any good alternative. Androids PdfRender perhaps, but it doesn't seem to have the feature support I want. Opening a external reader works but it means exposing (probably not) private pdf to a external app and it would be less integrated into the app. Finding a maintained fork of barteksc/AndroidPdfViewer seems like the good option, but there is 1,7k so which one is actually maintained is more the question then.
    c
    • 2
    • 6
Powered by Linen
Title
j

Johan

01/02/2023, 10:39 AM
What solution do people use for in app PDF viewing? Currently is using barteksc/AndroidPdfViewer because it has linkhandling/annotation/password, but hasn't been maintained in 3 years and is still on jCenter to my knowledge. Haven't found any good alternative. Androids PdfRender perhaps, but it doesn't seem to have the feature support I want. Opening a external reader works but it means exposing (probably not) private pdf to a external app and it would be less integrated into the app. Finding a maintained fork of barteksc/AndroidPdfViewer seems like the good option, but there is 1,7k so which one is actually maintained is more the question then.
c

Chrimaeon

01/02/2023, 11:37 AM
This a Kotlin related workspace. For your general android question, please see the channel description for more appropriate places to ask.
j

Johan

01/02/2023, 11:39 AM
I thought this was the general android question? Having seen a bunch of none Kotlin specific questions in the channel. Where would you recommend I ask this then?
c

Chrimaeon

01/02/2023, 11:40 AM
In the channel description you can find links to discord and so on.
j

Johan

01/02/2023, 11:41 AM
👍 should I delete the question to clean it up or just leave it?
c

Chrimaeon

01/02/2023, 11:41 AM
Up to you 🤷‍♂️ 😄
j

Johan

01/02/2023, 11:41 AM
😅
View count: 15