• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How to share an image with air for mobile?

New Here ,
Jul 20, 2017 Jul 20, 2017

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!

TOPICS
Development

Views

523

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
community guidelines
Engaged ,
Jul 20, 2017 Jul 20, 2017

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.

Release Notes Flash Player 24 AIR 24

Votes

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
community guidelines
New Here ,
Jul 20, 2017 Jul 20, 2017

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.

Votes

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
community guidelines
Advocate ,
Jul 24, 2017 Jul 24, 2017

Copy link to clipboard

Copied

LATEST

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.

Votes

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
community guidelines