Where is internal storage actually stored in android file system?
I read up on fileoutputstream and android internal storage and had a clarifying question. I know that internal storage is stored in data/data/packageName/files. What would be the package name if you have multiple packages in your Android application. Would it just be the package that contains the activity from where you called openFileOutput(...)?
I know that internal storage is stored in data/data/packageName/files
Not always. For Android 4.2+ tablets with secondary accounts, internal storage lies elsewhere (though I forget the path).
What would be the package name if you have multiple packages in your Android application
An Android application only has one package name. It is set in the package
attribute of the <manifest>
, and is optionally overridden in a build.gradle
file for Gradle/Android Studio developers.
Would it just be the package that contains the activity from where you called openFileOutput(...)?
Even though your activity may have its implementation in a different Java package, the files are stored in the application's package.
链接地址: http://www.djcxy.com/p/90016.html