I need to get all txt files created by some installed application in android. like if someone have skype installed so I need to get all text file created by this application.
Asked
Active
Viewed 99 times
0
-
Check this link http://stackoverflow.com/questions/8152125/how-to-create-text-file-and-insert-data-to-that-file-on-android – IntelliJ Amiya Apr 10 '14 at 05:12
2 Answers
0
For getting the file with particular extension like (.txt) you will have to use following code:-
class NameFilter implements FilenameFilter
{
public boolean accept(File dir, String name)
{
return (name.endsWith(".txt") ||name.endsWith(".TXT"));
}
}

Born To Win
- 3,319
- 3
- 19
- 27
0
if it's your application, you can do that easily..
(you know the path you are using very well)
however, if it's other's app (like Skype), as you know, it writes data in it's own exclusive directory (in phone memory).. e.g., /data/data/com.skype.raider
you can still have control over this by checking files inside getFilesDir()
- as long as you know the full-package-name (the principle is the same as Clear Data
)
check this out for further reference..
but it may also write files in sdcard,. which (the path) might be unpredictable..

Community
- 1
- 1

Yohanes Khosiawan 许先汉
- 2,453
- 4
- 24
- 28