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-architecture
  • m

    Mohamed Ibrahim

    11/25/2020, 2:20 PM
    if I have three fragments A, B, C and A is the home Fragment, how can I know if I’m coming from B or C when I press go back to A, using Navigation Component
    f
    • 2
    • 1
  • n

    Nuru

    11/25/2020, 3:47 PM
    If you've used Firebase with Clean architecture + MVVM, how do you handle implementing social authentication like Google Signin? 🤔
    g
    m
    i
    • 4
    • 6
  • a

    Adriano Celentano

    12/13/2020, 9:36 AM
    Im inside a suspending function in my viewmodel VM, but i need to make an operation with my activity and wait for the result in my VM. How would you approach this ? My initial approach was a sharedFlow inside my VM which is observed by the Activity, which triggers the operation in the Activity. Then i send the result to a Channel and in my VM i was waiting to receive sth on that channel. Felt quiet complicated. Also i think the receive method was not waiting untill sth was sent to the channel
    j
    u
    z
    • 4
    • 29
  • l

    Lilly

    12/29/2020, 10:29 AM
    Hi, I have a question regarding Clean Architecture and data models. It's recommended that every layer should have it's own data model and map to the consuming layer's data model. Lets say we have app, domain and data layer. Domain layer is the most inner circle. In data layer I would map to domain model but I have problems how to map from domain to app layer. Domain layer does not know about the model in the app layer so how to map it?
    j
    m
    +2
    • 5
    • 29
  • a

    Antoine Gagnon

    01/04/2021, 12:25 PM
    Hi everyone, small question about your practices, let’s say I have a list of restaurants, and then I want to get a detail view when I click one of those. What would you pass as an argument to the detail fragment? 1. The restaurant’s ID and then retrieve the proper data via the ViewModel 2. The restaurant’s detail view data as a serializable I’m currently doing the first one, but I’d like your opinion on this.
    j
    f
    +3
    • 6
    • 10
  • f

    FunkyMuse

    01/08/2021, 3:31 PM
    @yigit is it possible to create custom room types like rxjava3's flowables/observable/singe, paging's data source etc.. I want room to return a type of my sealed class result, just like you can do with retrofit?
    p
    j
    • 3
    • 8
  • u

    ursus

    02/02/2021, 5:48 PM
    How do you guys migrate sql columns which contain json? (where that json changed)
    d
    o
    • 3
    • 5
  • t

    Tiago Nunes

    02/06/2021, 8:41 PM
    Hi everyone, quick question for which I can't find the answer on Google: When using Navigation API, and SafeArgs:
    val args: SomeFragmentArgs by navArgs()
    Does the 
    args
     field keep its values after the activity gets killed by the system and recreated? In other words: does the Bundle sent to the Fragment survive? Cheers
    z
    • 2
    • 1
  • p

    Pablo

    02/10/2021, 9:13 AM
    Hello guys I have a question to the ones that have modularised apps by features. How are you doing the navigation between features in the app? (Activities and Fragments). I've read that there's bunch of ways but since I did not try all I want you to give me some feedback, I'm about to start a demo project and this is a part that I still don't know how to make it... What I've read (if you have any example of one of those and you can share it with me I'd appreciate): 1. Usage of deep-link to navigate through the app 2. What google "suggested" that is to "hard-code" the
    com.example.ActivityOne
    and create an intent of it (but what about Fragments?) @Gael Marhic I've read about quadrant, but is there any way to do it for Fragments? And is there any way to avoid using an external plugin? 3. Using coordinates or routers
    j
    z
    • 3
    • 3
  • u

    ursus

    02/16/2021, 5:38 AM
    quick poll, do you store access/refresh tokens in shared prefs or sqlite?
    w
    j
    +2
    • 5
    • 11
  • u

    ursus

    02/20/2021, 5:06 AM
    Is there a way to "fix" endpoint that takes bitmaps as base64 strings in json? Could I possibly somehow just stream the whole json, or will I need to implement multipart form data?
    f
    • 2
    • 2
  • b

    blakelee

    03/03/2021, 12:16 AM
    Do people pass their ViewModel into their RecyclerView adapter? I always figured that you wouldn't want to so that you can keep the adapter generic
    j
    s
    +4
    • 7
    • 6
  • n

    note8g2018

    03/03/2021, 10:09 AM
    Please tell Google to update the code lab for jetpack compose https://developer.android.com/courses/pathways/compose It is not working now Because the code is old and there are many huge changes in the framework jetpack compose Google should update the code
    👎 5
    c
    • 2
    • 1
  • u

    ursus

    03/16/2021, 12:37 AM
    Do you have opinions on rest api error design? Example: Entering a incorrect (made up) promo code. Is this a http code 400 or 200 + json body error=INVALID_PROMO_CODE
    s
    g
    • 3
    • 18
  • u

    ursus

    03/16/2021, 2:36 AM
    Single State people, how do you treat private vals? Do you remap to public? Or just not care? (Exposing integer counter to anyone is useless and it should be basically be just a boolean for anyone else) I know I can have private val on data class, but I cannot obviously increment it, etc
    f
    • 2
    • 1
  • a

    A. Sachdeva

    03/18/2021, 3:11 PM
    hey guys. what testing architecture/libraries do you use?
    m
    p
    • 3
    • 5
  • u

    ursus

    03/19/2021, 5:01 AM
    is there someting smart to version retrofit endpoints? (i.e. keep multiple versions in the codebase) without creating a bogus interface and creating wrapper subclasses having the actual retrofit interface as dependency? so much silly boilerplate
    • 1
    • 1
  • l

    Lilly

    03/19/2021, 12:38 PM
    I have a question regarding Clean Architecture and caching. According to the recommendations, the "repository" is responsible for caching so I'm able to cache the fetched data. In my use case (domain layer) I would do some transformations with the data. But what if I would like to also cache the data after transformation in domain layer, how would I do this? The use case shouldn't know anything about the outer layers...
    a
    j
    • 3
    • 70
  • u

    ursus

    03/21/2021, 4:04 AM
    Has anyone tries swapping moshi kapt for reflection for debug builds? Worth it?
    d
    • 2
    • 6
  • j

    Jason Ankers

    03/23/2021, 5:17 AM
    What layer should combined data exist in? Say I have a
    UserRepository
    and a
    WorkoutRepository
    , I want to combine data from both repositories into a single flow (user workout data). I then need to access that data across many screens in my app. Where should I put this logic?
    o
    v
    • 3
    • 2
  • r

    Rafal

    03/31/2021, 9:28 AM
    Is it ok to inject a
    ViewModel
    into another
    ViewModel
    ? I have one
    ViewModel
    scoped to an Activity and the second one scoped to a Fragment that could use one
    flow
    from the Activity one
    j
    w
    +2
    • 5
    • 5
  • h

    Hitender Pannu

    04/05/2021, 8:13 AM
    Is there any good reference for feature - level - modularization, including the handling of navigation
    p
    g
    • 3
    • 3
  • t

    trazercontact

    04/08/2021, 9:52 PM
    Hello guys, I'm looking for someone that want to review a mini library that I created inspired on redux, but with some ideas about dependency injection and event management. (I haven't published yet on github, because Idk if my approach worth it)
    v
    t
    • 3
    • 4
  • k

    Kinnar Vasa

    04/14/2021, 4:11 PM
    Hi Team, Anyone tried navigation graph in multi-module. My project having 2 modules: 1. application module 2. feature module Now, main application contains tab layout using navigation. When user taps on item of tab 1 -> it loads feature module navigation graph with back arrow and show in full screen (tabs should be hidden) Now, if I just use navigation event for navigate to module graph -> it’s showing bottom tab.  i understood issue, i.e. FragmentContainerview having only available area except tabs. So, it’s replacing there. But, now I want this in full screen. And I don’t want to expose more things in main module. Does anyone having idea? Thanks in advance.
    :android: 1
    m
    • 2
    • 1
  • v

    Viktor Petrovski

    04/22/2021, 11:33 AM
    Hello 👋 Often, especially in complex fragments I really want to break down components of the screen in separate custom views that will hold the view logic instead of overloading the fragment with bunch of stuff. This makes things a bit difficult when I use ViewModels and Hilt, since ViewModels are only intended to be used from Fragment or Activity and using it in any other place requires a workaround. Does anyone had the same difficulties? For everyone that uses Hilt and ViewModel do you use by viewModels() or you’ve built something custom. Would really appreciate to hear everyone thoughts about it. Cheers
    s
    s
    • 3
    • 19
  • s

    solidogen

    04/22/2021, 4:36 PM
    I have an enum class with @StringRes property, which I want to use in a few feature modules. I don’t want to put it directly in domain module, since it has android references, so I need to map into it. Where do I put this enum so all feature modules can access it, and to still have a way to map into it from domain module?
    j
    v
    • 3
    • 5
  • k

    KingKongCoder

    05/04/2021, 4:13 PM
    Dynamic feature module: i am trying to run instrumented tests and having this error as a dynamic feature module (feature1 is a dynamic feature module) is added running this command gives below error ./gradlew :feature1:connectedStgDebugAndroidTest Execution failed for task ‘:feature1:connectedStgDebugAndroidTest’.
    java.util.concurrent.ExecutionException: com.android.tools.build.bundletool.model.exceptions.InvalidCommandException: The APK Set archive does not contain the following modules: [feature1]
    should i add any bundle tool flags or setup before running instrumented tests or any know issues with dynamic feature module causing this error?
    m
    • 2
    • 2
  • s

    Slackbot

    05/05/2021, 10:06 AM
    This message was deleted.
    u
    • 2
    • 1
  • l

    Lilly

    05/12/2021, 4:54 PM
    I'm not so familiar with MVP, but can a presenter has other presenter as dependency? My concerns are related to testing
    s
    a
    +2
    • 5
    • 39
  • s

    sundernegi

    06/08/2021, 10:52 AM
    Anybudy give me best reference to learn MVVM architecture in Koltin
    a
    • 2
    • 1
Powered by Linen
Title
s

sundernegi

06/08/2021, 10:52 AM
Anybudy give me best reference to learn MVVM architecture in Koltin
a

Abhishek Dewan

06/08/2021, 2:53 PM
https://github.com/android/architecture-samples
View count: 3