안드로이드 개발 질문/답변
(글 수 45,052)
안녕하세요.
어플에서 데이타파일(이미지 등)을 외부서버에서 다운로드하려고 합니다.
(조건
1.외부에서 다운로드 되는 데이타파일이 작지만 삭제는 안합니다.
2.또한 지속적으로 다운로드가 되어서 데이타가 계속 쌓인게 됩니다.
3.어플삭제시 같이 지워짐.)
위와 같은 조건으로 구글링을 해보니 아래 두가지 경로를 알게 되었습니다.
내부저장소 data/data/패키지명/files
외부저장소 : mnt/sdcard/data/패키지명/files
내부저장소는 루팅하기 전까지는 사용자가 접근을 할 수 없어서 좋은데
혹 용량제한(?) 같은 것이 있다면 (조건 2)에서 걸릴것 같습니다.
그래서 외부저장소를 쓰자니 사용자가 접근을 할 수 있는 문제가 있습니다.
혹 내부저장소에 용량과 같은 제한이 있나요?
또한 그외 파일종류나 뭐 다른 제한 같은것이 있는지 알고 싶습니다.
give & take
브로드캐스트 리시버에 앱 삭제할경우 들어오는게 있던데.. 거기다가 외부저장소 경로에 있는 하위 파일 싹다 지우게하면 되지않을가요..
해본적은 없습니다...
public static final String ACTION_PACKAGE_REMOVED
Broadcast Action: An existing application package has been removed from the device. The data contains the name of the package. The package that is being installed does not receive this Intent.
EXTRA_UID
containing the integer uid previously assigned to the package.EXTRA_DATA_REMOVED
is set to true if the entire application -- data and code -- is being removed.EXTRA_REPLACING
is set to true if this will be followed by anACTION_PACKAGE_ADDED
broadcast for the same package.This is a protected intent that can only be sent by the system.