Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- 커스텀스피너
- viewmodelscope
- apk이름변경
- 셀룰로오스-g-폴리락타이드 공중합체
- 안드로이드 sms
- TwomonUSB
- bluetoothmanager
- 안드로이드스튜디오 jdk
- 비콘스캐닝
- 모의위치 주입
- 토글 험수
- compse collectAsState
- 코루틴 job
- 안드로이드 스튜디오 애뮬레이터
- compse state
- TowmonUSB 연결오류
- 코틀린 트리거 버튼
- 스레드 #코루틴
- 플라스틱 생분해
- withContext
- 1회용 플라스틱컵
- 안드로이드 mvvm
- var 와 val
- 안드로이드 비콘
- json 저장
- 코루틴스코프
- 라이브데이터 postValue
- #큐구조 #큐다운로드
- 코틀린 이미지저장 #파일저장
- Room 데이터베이스 업데이트
Archives
- Today
- Total
목록코틀린 이미지저장 #파일저장 (1)
EnjoyLife
이미지를 내부 저장소에 저장하는 함수
fun downloadImage(url: String, folderName: String, fileName: String?) { val appContext = applicationContext() //본인코드에 맞게 가져온다. // 폴더 생성 val folder = File(appContext.filesDir, folderName) if (!folder.exists() && !folder.mkdirs()) { Log.e("FileRepository", "Failed to create directory: $folderName") return } // 파일 경로 설정 val outputFile = File(folder, fileName) ..
안드로이드 개발/개발팁
2024. 5. 1. 15:48