[英]How do I access my app's package folder in Android using Adobe AIR / Flex?
I have an application for Android built using Flex. 我有一个使用Flex构建的Android应用程序。 I need to save some configurations and data so I want to know how I can access the package-specific folder for my app instead of creating my own folder and writing there.
我需要保存一些配置和数据,所以我想知道如何访问我的应用程序特定于软件包的文件夹,而不是创建自己的文件夹并在其中编写。
The package-specific folder I'm talking about is at /sdcard/Android/data/com.mysite.myapp/ . 我正在谈论的特定于软件包的文件夹位于/sdcard/Android/data/com.mysite.myapp/ 。 Do I just access it directly via that path or is there a variable for File class that I'm not aware of?
我是否仅通过该路径直接访问它,还是我不知道的File类变量?
The reason why I want to save onto this folder is because, if I create my own folder and save there, that would require my app to request the permission to access SD card contents. 我要保存到该文件夹的原因是,如果创建自己的文件夹并保存在其中,则需要我的应用程序请求访问SD卡内容的权限。 Something I don't want to include in my permission list.
我不想包含在我的权限列表中的内容。
For app specific files, you can choose either applicationDirectory
(read only), or applicationStorageDirectory
. 对于特定于应用程序的文件,您可以选择
applicationDirectory
(只读)或applicationStorageDirectory
。
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html http://help.adobe.com/zh_CN/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.