-
1. Re: Android Air - Access app files via native extension?
jeffward Jun 27, 2013 4:49 PM (in response to BKin2013)Indeed, a URL of the form app:/video.mp4 has no meaning outside your app. But if you use localFile.nativePath, that should give you a fully qualified path name - i.e. /.../.../video.mp4
However, I'm not sure other apps will be allowed (for security purposes) to read that file, but at least that should be one step closer.
-
2. Re: Android Air - Access app files via native extension?
BKin2013 Jun 30, 2013 2:59 AM (in response to jeffward)nativePath doesn't work on Android, you will get a null returned.
I've had no luck providing an asset from the assets/ folder in the APK to androids native media player, however I was able to place the video file into res/raw/ folder in the APK, although you can't just unzip/place file/zip/sign, you have to decompile the app, add the file then compile and sign. I'm not sure if you can setup a build process to do this instead of the way ADT is doing it(FlashDevelop handles it with batch scripts). Doing this I was able to get the freshplanet ANE to play the video within my app, I was using a modified branch on github that added local playback support. The other ANE VideoManager didn't respond to this however. Would seem you need to copy the file to storage outside of the app/APK to make it more accessible.
-
3. Re: Android Air - Access app files via native extension?
michaelarchbold Jun 10, 2014 10:11 PM (in response to BKin2013)Hi,
I've been investigating the issue trying to get access to video files packaged in an AIR app from an ANE but they are sometimes compressed in the APK rather than just being stored. Once they are compressed you get the following error:
java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed
I think this has to be an error in the AIR packaging, as they shouldn't be compressed. Any files like mp3, mp4, png etc shouldn't be compressed according to the Android packager.

