Skip to main content
Participating Frequently
November 22, 2011
Question

Air on android is not support sharedintent??

  • November 22, 2011
  • 1 reply
  • 2790 views

hello..

i want to register shaedIntent by air application, so i insert intent-filter in description xml below..

[xml in Air] -------------------------------

<application android:enabled="true">

<activity android:excludeFromRecents="false">

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

     <intent-filter>

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

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

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

         <data android:scheme="content" />

     </intent-filter>

</activity>

</application>

so the addition in Gallery option menu for shared was successful

But, when select Air Application, InvokeEvent parameter is empty..

[invoke Handler in Air] -------------------------------

protected function onInvokeEventHandler(event:InvokeEvent):void

{

          trace("[SharedIntentSample::onInvokeEventHandler(event)]" + arguments);

          trace("[SharedIntentSample::onInvokeEventHandler(event)]" + event.arguments);

          trace("[SharedIntentSample::onInvokeEventHandler(event)]" + event.reason);

          trace("[SharedIntentSample::onInvokeEventHandler(event)]" + event.arguments.length);

}

intent information is below..

[Intent information from native application] -------------------------------

11-23 11:14:06.288: D/SharedIntent(8409): action = android.intent.action.SEND

11-23 11:14:06.288: D/SharedIntent(8409): key = Intent.EXTRA_STREAM

11-23 11:14:06.288: D/SharedIntent(8409): uri= content://media/external/images/media/2

11-23 11:14:06.298: D/SharedIntent(8409): scheme= content

11-23 11:14:06.298: D/SharedIntent(8409): mimeType= image/jpeg

11-23 11:14:06.298: D/SharedIntent(8409): filePath :: /mnt/sdcard/DCIM/Camera/20111113_174316.jpg


How do i get the value from Intent??

This topic has been closed for replies.

1 reply

cbigbAuthor
Participating Frequently
November 25, 2011

anybody help me??

Participating Frequently
December 6, 2012

Hello, im having the same issue. Have you found an solution for that?

Inspiring
May 8, 2013

@ArneOb

Can you please show some code?


Anyone been able to get anywhere?  I was hoping to get one or more images from the gallery into my app.  I looked on stack overflow and found the below for my manifest which populates the share list for one or more images but it causes my app to crash.  Mainly because I don't have the right activity defined in my app.  Is there a default activity for an Air app that I can try replacing ".activities.ImportImagesActivity"

<activity
       android:label="@string/app_name"
       android:name=".activities.ImportImagesActivity" >
       <intent-filter>  
           <action android:name="android.intent.action.SEND" />
           <category android:name="android.intent.category.DEFAULT" />
           <data android:mimeType="image/*" />
       </intent-filter>
       <intent-filter>  
           <action android:name="android.intent.action.SEND_MULTIPLE" />
           <category android:name="android.intent.category.DEFAULT" />
           <data android:mimeType="image/*" />
       </intent-filter>
   </activity>