Skip to main content
Participating Frequently
Sep 23, 2017 11:19 PM UTC
Question

How to receive shared images on Andoid and iOS?

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 is closed to new replies. Start a new post to keep the conversation going.

1 reply

Participating Frequently
Sep 25, 2017 6:29 PM UTC

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...

Translate