Skip to main content
Inspiring
September 21, 2014
Answered

File.getDirectoryListing() and browseForOpen() no longer working in Android OS 4.4.2

  • September 21, 2014
  • 1 reply
  • 876 views

Hi,

As of Android 4.4.2 ( aka. API 19 - Kit Kat ), it appears that File.userDirectory.getDirectoryListing() is no longer returning anything.  Also, a call to File.userDirectory.browseForOpen() causes my app to crash instantly.

Both functions work fine in Android 4.3 ( aka. API 18 - Jelly Bean ), however.

Did something change, or are new permissions required for using the File API, in 4.4.2?

My setup:  I am testing in AVD ( Android Virtual Device ).  My app is compiled with AIR SDK 14.0.0.178 ( note: the app crashes on load if compiled with AIR 15.0.0.249, but that's due to a different problem ).

This topic has been closed for replies.
Correct answer AsterLUXman

Ok.  I figured it out.

Ever since the new sd card requirements for Android KitKat, an 3rd-party app must request the WRITE_EXTERNAL_STORAGE permission in the app manifest, in order to access public folders on the sd card, such as: the sd card's root ( /sdcard ) where music files get copied by default, for example.

Interesting write-up on the issue:

External Blues: Google Has Brought Big Changes To SD Cards In KitKat, And Even Samsung Is Implementing Them

1 reply

AsterLUXmanAuthorCorrect answer
Inspiring
September 21, 2014

Ok.  I figured it out.

Ever since the new sd card requirements for Android KitKat, an 3rd-party app must request the WRITE_EXTERNAL_STORAGE permission in the app manifest, in order to access public folders on the sd card, such as: the sd card's root ( /sdcard ) where music files get copied by default, for example.

Interesting write-up on the issue:

External Blues: Google Has Brought Big Changes To SD Cards In KitKat, And Even Samsung Is Implementing Them