본문 바로가기
프로그래밍 놀이터/안드로이드, Java

[android] 외부저장소의 앱 고유 영역 사용하기

by 돼지왕 왕돼지 2017. 9. 21.
반응형

 

 [android] 외부저장소의 앱 고유 영역 사용하기


alarms, android/data, dcim, DIRECTORY_ALARMS, DIRECTORY_DCIM, DIRECTORY_DOWNLOADS, DIRECTORY_MOVIES, DIRECTORY_MUSIC, DIRECTORY_NOFICATIONS, DIRECTORY_PICTURES, DIRECTORY_PODCATS, Downloads, Environment, files, getExternalFilesDir, movies, music, Notifications, packageName, Pictures, Podcats, type, [android] 외부저장소의 앱 고유 영역 사용하기, 앱 고유 영역, 외부저장소, 표준 디렉토리


Context.getExternalFilesDir( String type )


위의 함수로 얻어진 File 은 앱 고유 영역이라 불리는 표준 디렉토리이다.

인자명에 따라 얻어지는 폴더가 달라진다


Environment.DIRECTORY_ALARMS

     Android/data/[packageName]/files/Alarms


Environment.DIRECTORY_DCIM

     Android/data/[packageName]/files/DCIM


Environment.DIRECTORY_DOWNLOADS

     Android/data/[packageName]/files/Downloads


Environment.DIRECTORY_MUSIC

     Android/data/[packageName]/files/Music


Environment.DIRECTORY_MOVIES

     Android/data/[packageName]/files/Movies


Environment.DIRECTORY_NOFICATIONS

     Android/data/[packageName]/files/Notifications


Environment.DIRECTORY_PICTURES

     Android/data/[packageName]/files/Pictures


Environment.DIRECTORY_PODCATS

     Android/data/[packageName]/files/Podcasts


null

     Android/data/[packageName]/files




반응형

댓글