how to work when a app run
A app need to save some data After it achieve information and need to save something when user changed some settings.
the functions the app need
- create app directory and some kinds of directories such as images,text and so on.
- save some data when we download some data which will not be changed temporarily.And we should use individual names to distinguish the kind of data.
- check whether the data has saved.If it has been saved, get it from the storage and deal with it.If it does not exist,download and save it.
Detail
permission
1 | // app should ask for the permission |
To get external storage: Environment.getExternalStorageDirectory();
To create a file :
1 | new File(String parent,String name), |
1 | //To write file,use |