Computer Hippocampus
  • 홈
  • 태그
  • 방명록
  • 메뉴 닫기
  • 글작성
  • 방명록
  • 환경설정
    • 분류 전체보기 (176)
      • Daily Records (0)
      • Coding Test 관련(with Kotlin) (0)
      • Android Dev (87)
        • NowInAndroid (7)
        • NaimanProject (0)
        • Compose (21)
        • Navigation (4)
        • Google Billing API (4)
        • Test Firebase Chatting App (12)
        • Login API 정리 (0)
        • Error logs (0)
      • 코틀린(Kotlin, Java) (14)
      • Swift (12)
        • codingTest (0)
      • Spring Boot (1)
      • Scala (3)
      • Js (0)
      • Programming Theory (13)
        • Functional Programming (2)
        • Design Pattern (0)
        • Generics (3)
        • 비동기 패러다임(Asynchronous Para.. (0)
        • 코루틴(Coruotine) (8)
        • Rxjava (0)
      • 파이어베이스(Firebase) (0)
      • 프로그래밍 팁 (1)
      • SystemVerilog (2)
      • Adobe (4)
        • 포토 일러스트레이터 (4)
        • Premiere pro (0)
      • Github 팁 (3)
      • RiscV (2)
        • Wake (1)
      • Linux (2)
      • CSS (4)
      • 회사 관련 (0)
  • 홈
  • 태그
  • 방명록
Android Dev/NowInAndroid

NowInAndroid(6) - Version Catalog / build-logic + unitTest implementation

1> Version Catalog를 통한 버전 관리 순서 요약 1. ../gradle/libs.versions.toml 에 라이브러리를 정리한다. [versions] accompanist = "0.27.0" androidDesugarJdkLibs = "1.2.0" androidGradlePlugin = "7.3.1" ... [libraries] accompanist-flowlayout = { group = "com.google.accompanist", name = "accompanist-flowlayout", version.ref = "accompanist" } accompanist-systemuicontroller = { group = "com.google.accompanist", name = "acc..

2022. 11. 15. 01:28
Android Dev/NowInAndroid

NowInAndroid(4) - SyncWorker/SyncUtilities

Sync의 목적은 local data와 remote source의 동기화이다. 아래 설명에 대한 코드들은 대부분 아래의 경로에 구현되어있다 1) SyncUtilities 아래의 공식 설명을 참고하면 각 스탭에서 SyncWorker가 동작하는 부분이 있는 것을 확인할 수 있다. 통합적인 설명은 다음장에서 하기로하고, 일단은 SyncWorker/SyncUtilities 코드를 분석해본다. 스탭 중간중간에 Sync를 위해 메소드가 호출되는 것을 확인할 수 있다. 이를 볼 것이다. Step Description Code 1 On app startup, a WorkManager job to sync all repositories is enqueued. SyncInitializer.create 2 The initi..

2022. 11. 3. 21:21
Android Dev/NowInAndroid

NowInAndroid(3) - (Hilt) Viewmodel + DI overall flow, 재구성 예제

1. ViewModel with Compose data flow 1> Viewmodel을 hiltViewmodel()을 통해 instance 하면 DI 를 통해 필요한 정보들을 다 끌어다와 필요한 repository와 usecases를 가져다 올 수 있다. 2> ViewModel은 repository에서 stateFlow로 가져온 데이터를 Usecase와 조합하여 ViewModel내의 stateFlow로 조합하고, call back method를 관리하기 위해 메소드를 생성한다. 3> Compose 내에서는 instance된 ViewModel의 stateFlows에 대해 collectAsStateWithLifeCycle로 ViewModelScope내에 데이터를 수집할 수 있으며 수집된 데이터를 기반으로 ..

2022. 11. 1. 17:19
Android Dev/NowInAndroid

NowInAndroid(2) - ForYouViewModel

이전글 : https://witcheryoon.tistory.com/336 ViewModel을 컨트롤하는 Flow method들을 이해하면 만드는데 도움이 될 것이다. 설명페이지1 :Flow-kotlinx-coroutine-core : https://witcheryoon.tistory.com/292: 리스트 : SharedFlow / shareIn / onSubscription / conflate / stateFlow / toStates / scan / reduce / merge 0> Full code : @OptIn(SavedStateHandleSaveableApi::class) @HiltViewModel class ForYouViewModel @Inject constructor( syncStatusM..

2022. 10. 28. 01:10
Android Dev/NowInAndroid

collectAsStateWithLifecycle 요약

원본 페이지 : https://medium.com/androiddevelopers/consuming-flows-safely-in-jetpack-compose-cde014d0d5a3 Consuming flows safely in Jetpack Compose 1. collectAsStateWithLifecycle API를 사용하면, UI를 컨트롤할때 lifecycle를 aware한채로 flow의 collect를 진행할 수 있다. 2. resource 관리 측면에서 better than not use. 3. collectAsState API와 대응되는 API이다. 4. Compose State 의 object가 update 될때마다 모든 State.value 사용이 recomposition된다. 5. 기본적으..

2022. 10. 28. 00:09
Android Dev/NowInAndroid

SavedStateHandle 사용

먼저, SavedStateHandle.kt 의 첫부분의 설명은 아래와 같다. https://developer.android.com/reference/kotlin/androidx/lifecycle/SavedStateHandle A handle to saved state passed down to androidx.lifecycle.ViewModel. You should use SavedStateViewModelFactory if you want to receive this object in ViewModel's constructor. This is a key-value map that will let you write and retrieve objects to and from the saved state. ..

2022. 10. 25. 14:00
  • «
  • 1
  • 2
  • »

공지사항

전체 카테고리

  • 분류 전체보기 (176)
    • Daily Records (0)
    • Coding Test 관련(with Kotlin) (0)
    • Android Dev (87)
      • NowInAndroid (7)
      • NaimanProject (0)
      • Compose (21)
      • Navigation (4)
      • Google Billing API (4)
      • Test Firebase Chatting App (12)
      • Login API 정리 (0)
      • Error logs (0)
    • 코틀린(Kotlin, Java) (14)
    • Swift (12)
      • codingTest (0)
    • Spring Boot (1)
    • Scala (3)
    • Js (0)
    • Programming Theory (13)
      • Functional Programming (2)
      • Design Pattern (0)
      • Generics (3)
      • 비동기 패러다임(Asynchronous Para.. (0)
      • 코루틴(Coruotine) (8)
      • Rxjava (0)
    • 파이어베이스(Firebase) (0)
    • 프로그래밍 팁 (1)
    • SystemVerilog (2)
    • Adobe (4)
      • 포토 일러스트레이터 (4)
      • Premiere pro (0)
    • Github 팁 (3)
    • RiscV (2)
      • Wake (1)
    • Linux (2)
    • CSS (4)
    • 회사 관련 (0)
애드센스 광고 영역
  • 최근 글
  • 최근 댓글

최근 글

최근댓글

태그

MORE

전체 방문자

오늘
어제
전체

블로그 인기글

Powered by Privatenote Copyright © Computer Hippocampus All rights reserved. TistoryWhaleSkin3.4

티스토리툴바