Copy link to clipboard
Copied
Hi, I have been trying to share an image with the datashare ANE with FlashDevelop: http://www.adobe.com/devnet/air/articles/datashare-native-extension.html
At first, it was working great (AIR 24), but since I updated the AIR sdk (I am using AIR 26), it doesn't seem to work anymore. I get this:
[Fault] exception, information=Error: Error #3001: File or directory access denied.
in flash.filesystem::FileStream/open
But my application.xml file already has <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
I'm kind of stuck here, and don't know where to look at... Any help?
Thanks!
Copy link to clipboard
Copied
Are you also calling File.requestPermission?
From Android 6+ And AIR24+ you need to also run permission checking code
See the release notes for sample code flow.
Copy link to clipboard
Copied
Maybe the ANE does that, I don't know...
After further testing, I was able to use the DataShare feature on an older device (galaxy S3, android 4.4.4). Maybe that's the issue? The most recent phone is on Android 7.0.
Copy link to clipboard
Copied
It looks like this ANE saves the image to a file before sending a reference to other apps to be able to share it. That means with latest Air / Android you will need to ask for the permission as described in the Air 24 release notes
Alternatively you can use another ANE. For example we are using the GoViral ANE to share images and they have removed the requirement to give a WRITE permission in the latest version of their ANE.