简体   繁体   English

内部存储实际上存储在android文件系统中的什么位置?

[英]Where is internal storage actually stored in android file system?

I read up on fileoutputstream and android internal storage and had a clarifying question. 我阅读了fileoutputstream和android内部存储,并提出了一个明确的问题。 I know that internal storage is stored in data/data/packageName/files. 我知道内部存储存储在data / data / packageName / files中。 What would be the package name if you have multiple packages in your Android application. 如果您的Android应用程序中有多个软件包,则软件包名称是什么。 Would it just be the package that contains the activity from where you called openFileOutput(...)? 只是包含您调用openFileOutput(...)位置的活动的软件包吗?

I know that internal storage is stored in data/data/packageName/files 我知道内部存储存储在data / data / packageName / files中

Not always. 不总是。 For Android 4.2+ tablets with secondary accounts, internal storage lies elsewhere (though I forget the path). 对于具有辅助帐户的Android 4.2+平板电脑,内部存储位于其他位置(尽管我忘记了路径)。

What would be the package name if you have multiple packages in your Android application 如果您的Android应用程序中有多个软件包,软件包名称是什么?

An Android application only has one package name. 一个Android应用程序只有一个包名称。 It is set in the package attribute of the <manifest> , and is optionally overridden in a build.gradle file for Gradle/Android Studio developers. 它在<manifest>package属性中设置,并且可以选择在Gradle / Android Studio开发人员的build.gradle文件中覆盖。

Would it just be the package that contains the activity from where you called openFileOutput(...)? 只是包含您调用openFileOutput(...)位置的活动的软件包吗?

Even though your activity may have its implementation in a different Java package, the files are stored in the application's package. 即使您的活动可能在不同的Java包中实现,但文件仍存储在应用程序的包中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM