Environment.getdatadirectory (). GetPath ():/data
Environment.getdownloadcachedirectory (). GetPath ():/cache
Environment.getexternalstoragedirectory (). GetPath ():/mnt/sdcard
Environment.getrootdirectory (). GetPath ():/system
Context.getcachedir (). GetPath ():/data/data/Package name/cache
Context.getexternalcachedir (). GetPath ():/mnt/sdcard/android/data/Package name/cache
Context.getfilesdir (). GetPath ():/data/data/Package name/files
Context.getobbdir (). GetPath ():/mnt/sdcard/android/obb/package Name
Context.getpackagename (): Package name
Context.getpackagecodepath ():/data/app/app Name
Context.getpackageresourcepath ():/data/app/app Name
/data/data/cn.tony.app/files/This path may be obtained by invoking Getfilesdir in the context subclass (Activity,service, and so on) under the package named "Cn.tony.app".
/mnt/sdcard/, however, should be available on Android systems below 4.0, via the Environment class's getExternalStorageDirectory method.
In fact, getexternalstoragedirectory this method, rather, is to get the default memory. In different versions of the Android system, the point of location is not the same. For example, on more than 4.0 of the system, it generally points to "storage/sdcard0" (Built-in SD card), but there are manufacturers or individuals to set it to "Storage/sdcard1" (external SD card). Like window, the system is usually installed in the C drive, but in the D drive can actually.
Get the Android file path