简体   繁体   English

如何使用Adobe AIR / Flex在Android中访问应用程序的package文件夹?

[英]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.

相关问题 Adobe Native Extensions:如何将第三方库 (.jar) 打包到我的 Flex 应用程序的 Android Native Extensions 中? - Adobe Native Extensions: How do I package third party libraries (.jar) in a Android Native Extension for my Flex App? 如何使用android java应用访问我已扎根的android手机的\\ data \\ data文件夹? - How do I access my rooted android phone's \data\data folder using android java app? 我如何知道在Android上使用Adobe Air安装了特定的应用程序 - How do I know if a specific app is installed using Adobe Air on Android Flex上适用于Android的Adobe Air:如何删除所有应用程序数据? - adobe air for android on flex: how do I delete all the application data? 如何为我的Android应用程序(Adobe air)设置“共享按钮”? - How to make a “share button” for my android app (Adobe air)? 如何获得对Android应用程序的Adobe AIR活动的引用? - How can I get a reference to the Adobe AIR Activity for an Android app? 如何使用ActionScript 3访问APK文件中的资产? (Adobe AIR) - How do I access assets inside a APK file using ActionScript 3? (Adobe AIR) 如何在PC上运行android Adob​​e AIR应用程序(不使用模拟器)? - How to run an android Adobe AIR app on PC (without using emulators)? 如何为使用Android的Adobe AIR开发的App创建启动画面? - How to create Splash screen for App developed by Adobe AIR using Android? 如何使用As3最小化Adobe Air Android应用程序? - How to minimize adobe air android app with as3?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM