안드로이드 개발 질문/답변
(글 수 45,052)
음..녹음기?/ 대충 그래서.. sdcard안에 파일을 저장했는데요..
어플을 삭제해도 지워지지가 않네요..;;
물론 삭제하든말든.. 안에 남아있게 하면 저야 편하지만..
사용자 입장에서는 기가막힌일이겟죠?ㅠ_ㅠ
어플 삭제시에 sdcard에 저장된 녹음파일들도 삭제하고 싶은데.. 어떻게 할수 있을까요??
어플을 삭제해도 지워지지가 않네요..;;
물론 삭제하든말든.. 안에 남아있게 하면 저야 편하지만..
사용자 입장에서는 기가막힌일이겟죠?ㅠ_ㅠ
어플 삭제시에 sdcard에 저장된 녹음파일들도 삭제하고 싶은데.. 어떻게 할수 있을까요??
2010.09.08 17:51:19
http://developer.android.com/guide/topics/data/data-storage.html#filesExternal
<meta charset="utf-8">If you're using API Level 8 or greater, use
getExternalFilesDir()
to open a File
that represents the external storage directory where you should save your files. This method takes a type
parameter that specifies the type of subdirectory you want, such as DIRECTORY_MUSIC
and DIRECTORY_RINGTONES
(pass null
to receive the root of your application's file directory). This method will create the appropriate directory if necessary. By specifying the type of directory, you ensure that the Android's media scanner will properly categorize your files in the system (for example, ringtones are identified as ringtones and not music). If the user uninstalls your application, this directory and all its contents will be deleted.
다른 앱에서는 감지할 수 있는것 같은데, 여튼 방법이 없는 것 같네요.