일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 주석
- ViewModel
- Gradle
- asLiveData()
- electron
- hilt
- Android
- Safe Args
- 취업
- nav_graph
- 일렉트론
- Datastore
- 스플래시
- imageview
- 면접
- fragment
- Livedata
- Binding Adapter
- recyclerview
- 개발자
- Jetpack Compose
- kotlin
- android studio
- TypeConverter
- themes.xml
- Navigation Component
- BottomNavigationView
- room
- 테마
- 안드로이드
Archives
- Today
- Total
목록인터넷 (1)
나만 보는 일기장
네트워크 연결 상태를 확인하는 함수
private fun hasInternetConnection(): Boolean { val connectivityManager = getApplication().getSystemService( Context.CONNECTIVITY_SERVICE ) as ConnectivityManager val activeNetwork = connectivityManager.activeNetwork ?: return false val capabilities = connectivityManager.getNetworkCapabilities(activeNetwork) ?: return false return when { capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIF..
개발/Android
2021. 11. 8. 17:33