We have a flex mobile application that (among other things) downloads files from a server.
We want to allow other applications to be able to get those files out of our application. One example of such a use case is the gmail application when you want to add an attachment to a new message. If you click the button you get a chooser that shows all applications from which you can get content.
On android this is done via handling the GET_CONTENT and PICK intent filters.
I've been able to change the manifest in order to register my app, and my app now appears in the chooser.
BUT : if I register the intent filters with the flex activity (called AppEntry), nothing happens (I get and InvokeEvent.INVOKE event, but the control flow is returned right away to the calling app with no result).
So I went the ANE (air native extension) route, and was able to wire the GET_CONTENT and PICK intent filters to a native Activity, and after some hacking around I could show the AppEntry Flex Activity and wait for it to send me a message so that I could return a file.
This works but is not user friendly because the user stays in the Flex Application and does not return to the calling activity (gmail for example) because I can't "finish" the flex Activity.
I though about embedding the AppEntry Activity in my native Activity (using an ActivityGroup) but only got a black screen. I also tried to bring the calling activity to the front but with no success (I got SecurityExceptions)
Is there something I can do here ? Anybody has any idea ?
.
stackoverflow.comm
No comments:
Post a Comment