Preferences DataStore1 DataStore of Android Jetpack DataStore란? Data Storage Solution이다. Kotlin으로 만들어졌으며, Coroutines와 Flow를 정식 지원하여 async한 작업이 가능 SharedPreferences의 새 버전이라고 생각해도 된다. Why DataStore? Kotlin, Coroutines, Flow 정식 지원 SharedPreferences는 sync API를 지원하며, Main-thread-safe하지 않다. DataStore는 Dispatchers.IO를 사용하기 때문에 Main-thread에서 사용하기에 안전하다. runtime exception들로부터 안전하다. SharedPreferences로부터의 migration을 제공 Type Safety 제공 Implementation DataStor.. 2021. 10. 24. 이전 1 다음