incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Williams Farias <will.far...@gmail.com>
Subject Share image from gallery
Date Thu, 06 Dec 2012 04:10:44 GMT
Hello everyone,

I´m having am issue when i try to share an image from android gallery.
I dont know if there is a way to do it, but i think it should do.
If anyone can even tell me if it is possible or not, it would help a lot;
and if is not possible, stay here registered the idea to make it works on
future versions.

*The problem: *
I want to share a picture located in the phone gallery by 'share via'
option.
'Share via' shows a list of applications witch i can send that image
throught them. I want to include my application on that list.

*The solution:
*First i include on the manifest file an new activity.

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

Ok, my application is now on the list, and when i click it opens correctly
my application.
Then on flex i add an listener on INVOKE:

protected function preinitializeHandler(event:FlexEvent):void{

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

But i cant see any parameter or data.

    private function onInvoke(event:InvokeEvent):void{
                trace("COMP.: "+event.type);
                trace("COMP.: "+event.currentDirectory.data);
trace("COMP.: "+event.currentDirectory.data);
                trace("COMP.: "+event.target);
                trace("COMP.: "+event.currentTarget);
                trace("COMP.: "+event.arguments);
                trace("COMP.: "+event.reason);
            }

Is it possible? does anyone run into this problem? is it even possible to
do it?

Thaks.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message