Skip to main content
Participating Frequently
September 23, 2017
Question

How to receive shared images on Andoid and iOS?

  • September 23, 2017
  • 1 reply
  • 318 views

HI, I'd like to add my AIR app to the eligible ones to receive shared images on Android and iOS. How can I do it? How can I access the image after it is shared to my app? Do I need an extension to do that?

Thank you a lot!

This topic has been closed for replies.

1 reply

Participating Frequently
September 25, 2017

Adding the app to the sharing list was easy: I just put this into the android manifestAdditions on my application descriptor:

<application>

  <activity>

    <intent-filter>

      <action android:name="android.intent.action.MAIN" />

      <category android:name="android.intent.category.LAUNCHER" />

    </intent-filter>

    <intent-filter>

      <action android:name="android.intent.action.SEND" />

      <category android:name="android.intent.category.DEFAULT" />

      <data android:mimeType="image/*" />

    </intent-filter>

  </activity>

</application>

I was expecting to receive ionformation about the shared picture from the InvokeEvent when the app was started by the sharing event, like this:

NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, onInvoke);

And

private function onInvoke(evt:InvokeEvent):void

{

  // process the event here to get shared imga info

}

However the received InvokeEvent does not come with any info about the picture...