Highlighted

Cannot get files in userDirectory with getDirectoryListing()

Community Beginner ,
Aug 30, 2017

Copy link to clipboard

Copied

I'm testing getDirectoryListing() with my Android devices.

Then files are obtained using Android device (Ver.4.1.2).

but are not obtained using (Ver.6.0.1).

The code is very simple.

----------------------------------------------------------

var FArr:Array = File.userDirectory.getDirectoryListing();

trace("Number of files = " + FArr.length.toString() );

for(var i:int=0; i<FArr.length ; i++){

     trace("name = " + FArr.name );

}

----------------------------------------------------------

As written in the forum (https://forums.adobe.com/message/6748751#6748751)

I set WRITE_EXTERNAL_STORAGE permission in the app manifest.

But I've been unable to get the outputs yet.

Does anyone know the resolution?

regards

You probably need to use the new permissions system. Check here: Release Notes Flash Player 24 AIR 24

and scroll down to the section on permissions.

TOPICS
Development

Views

257

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

Cannot get files in userDirectory with getDirectoryListing()

Community Beginner ,
Aug 30, 2017

Copy link to clipboard

Copied

I'm testing getDirectoryListing() with my Android devices.

Then files are obtained using Android device (Ver.4.1.2).

but are not obtained using (Ver.6.0.1).

The code is very simple.

----------------------------------------------------------

var FArr:Array = File.userDirectory.getDirectoryListing();

trace("Number of files = " + FArr.length.toString() );

for(var i:int=0; i<FArr.length ; i++){

     trace("name = " + FArr.name );

}

----------------------------------------------------------

As written in the forum (https://forums.adobe.com/message/6748751#6748751)

I set WRITE_EXTERNAL_STORAGE permission in the app manifest.

But I've been unable to get the outputs yet.

Does anyone know the resolution?

regards

You probably need to use the new permissions system. Check here: Release Notes Flash Player 24 AIR 24

and scroll down to the section on permissions.

TOPICS
Development

Views

258

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
Aug 30, 2017 0
Engaged ,
Aug 30, 2017

Copy link to clipboard

Copied

You probably need to use the new permissions system. Check here: Release Notes Flash Player 24 AIR 24

and scroll down to the section on permissions.

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...
Aug 30, 2017 0
Community Beginner ,
Aug 30, 2017

Copy link to clipboard

Copied

Thank you for the kind advice.

I'll read and try it and write the results later.

Best regards.

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...
Aug 30, 2017 0
Community Beginner ,
Aug 31, 2017

Copy link to clipboard

Copied

Thanks to the advice,  I've almost been able to reach to the resolution.

I refered a sample in the web page below.

https://forums.adobe.com/thread/2267876

Thank you!

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...
Aug 31, 2017 0