Android(Kotlin) 261

ROOM + Coroutine Flow - 5 (Flow)

코루틴 Flow를 잠깐 보고 갔는데, 이 친구가 뭐인지 한번 보고 가겠습니다. 간단하게 Flow Collect 기능을 통해서 데이터를 가져오는 것 말고 다양한 기능을 한번 보고 가겠습니다. 코루틴 공식 문서를 보면 아래와 같이 나와 있습니다. A suspending function asynchronously returns a single value, but how can we return multiple asynchronously computed values? This is where Kotlin Flows come in. single value는 suspension function 을 통해서 return 할 수 있는데, multiple values는 어떻게 할꺼냐? 이건 Flow를 이용해서 할 수 있다..

Android(Kotlin) 2023.01.28

Threading models in Coroutines and Android SQLite API

Threading models in Coroutines and Android SQLite API 에 대한 번역입니다. 원문은 여기서 보세요. https://medium.com/androiddevelopers/threading-models-in-coroutines-and-android-sqlite-api-6cab11f7eb90 Threading models in Coroutines and Android SQLite API Implementing suspending transactions in Room medium.com Implementing suspending transactions in Room Room에서 suspneding 트랜젝션 적용 Room 2.1 now lets you use Kotlin C..

Android(Kotlin) 2023.01.19

local.properties

- 참조 https://developers.google.com/maps/documentation/android-sdk/secrets-gradle-plugin Secrets Gradle 플러그인 | Maps SDK for Android | Google Developers 이 페이지는 Cloud Translation API를 통해 번역되었습니다. Switch to English 의견 보내기 Secrets Gradle 플러그인 컬렉션을 사용해 정리하기 내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요. 버전 developers.google.com https://leveloper.tistory.com/212 [Android] API key값 local.properties에 안전하게 보관하기 안드로이드 프로젝트..

Android(Kotlin) 2023.01.17

Room SQLCipher

그 어떤곳에서도 한국어로 Room 데이터 암호화 및 SQLCipher에 대한 설명글이 없어서 제가 번역해서 정리하기로 했습니다. (유독 안드로이드 관련 정보는 한국어를 찾기가 어렵네요) 이 글에 대한 번역이고 코드는 여기에 있는 코드를 참고했습니다. 구글에서 일하는 형님이시니 믿고 번역해보겠습니다. Protect your Room database with SQLCipher on Android Android에서 SQLCipher로 Room 데이터베이스 보호 Welcome to this serie of articles about Android Security and how you can improve tremendously the protection of your users’ privacy, by imple..

Android(Kotlin) 2022.12.21

StateFlow / SharedFlow

코루틴을 공부하다보면 가끔 보는 친구들입니다. 이 친구들이 뭔지 한번 보고 가겠습니다. - 구글 공식문서 우선 구글 공식문서에서는 어떻게 설명하고 있냐하고 하면 stateFlow StateFlow는 현재 상태와 새로운 상태 업데이트를 수집기에 내보내는 관찰 가능한 상태 홀더 흐름입니다. value 속성을 통해서도 현재 상태 값을 읽을 수 있습니다. 상태를 업데이트하고 흐름에 전송하려면 MutableStateFlow 클래스의 value 속성에 새 값을 할당합니다. Android에서 StateFlow는 관찰 가능한 변경 가능 상태를 유지해야 하는 클래스에 아주 적합합니다. 여기까지 읽어보면 LiveData와 비슷한데? 라는 생각이 듭니다. livedata와 차이점 때문에 구글 문서에서는 StateFlow와 ..

Android(Kotlin) 2022.12.15

Hot Stream / Cold Stream

Coroutine을 공부하다보면 Hot Stream / Cold Stream 이라는 단어를 만나게 됩니다. 여러가지 설명이 있습니다만 비유하자면 물을 데이터라도 생각했을 때 Hot Stream -> 냇가 -> 그냥 물이 줄줄 흐른다 - > 중간에 사슴이 먹어도 되고, 사람이 먹어도 되고 등등 Cold Stream -> 수도꼭지 -> 내 집에서 내가 틀면 나온다 -> 나만 쓸 수 있다 정도로 생각하면 될 것 같습니다. - 참조 https://myungpyo.medium.com/%EC%BD%9C%EB%93%9C-%ED%94%8C%EB%A1%9C%EC%9A%B0-%ED%9A%A8%EC%9C%A8%EC%A0%81%EC%9C%BC%EB%A1%9C-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0-..

Android(Kotlin) 2022.12.15