Highlighted

getExternalFilesDirs() - How do we write to external sd card for android 4.4 and above?

New Here ,
Oct 19, 2015

Copy link to clipboard

Copied

We are making an app in adobe air in which we want to save files downloaded from the internet. We would prefer that this is stored to the external sd card since the filesize is big.

Now according to this link - ((http://developer.android.com/guide/topics/data/data-storage.html#AccessingExtFiles))  since Android 4.4 - we dont need any permission to write to your apps = private directories.

We have been able to store the downloaded files to the "external partition" of internal memory. We want to be able to store the files on "external sd card" if it exists.

There is a function - getExternalFilesDirs() which enables this . What is the alternate function in Air (actionscript) to run this function?

Thanks & Regards,

TOPICS
Development

Views

878

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

getExternalFilesDirs() - How do we write to external sd card for android 4.4 and above?

New Here ,
Oct 19, 2015

Copy link to clipboard

Copied

We are making an app in adobe air in which we want to save files downloaded from the internet. We would prefer that this is stored to the external sd card since the filesize is big.

Now according to this link - ((http://developer.android.com/guide/topics/data/data-storage.html#AccessingExtFiles))  since Android 4.4 - we dont need any permission to write to your apps = private directories.

We have been able to store the downloaded files to the "external partition" of internal memory. We want to be able to store the files on "external sd card" if it exists.

There is a function - getExternalFilesDirs() which enables this . What is the alternate function in Air (actionscript) to run this function?

Thanks & Regards,

TOPICS
Development

Views

879

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 19, 2015 0
Contributor ,
Oct 21, 2015

Copy link to clipboard

Copied

First you will need to declare the permissions to WRITE_EXTERNAL_STORAGE in your app manifest.  The external storage can be found through the documentsDirectory, see:

Adobe Flash Platform * Working with File objects in AIR

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 21, 2015 0
New Here ,
Oct 22, 2015

Copy link to clipboard

Copied

Thanks for your answer.

I have given WRITE_EXTERNAL_STORAGE in my manifest. Files.documentsDirectory,Files.userDirectory,Files.desktopDirectory all points to external part of my internal storage and not external sdcard. I want to write data to my EXTERNAL SDCARD. How can i do that?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 22, 2015 0