Register Mobile APP to handle files

Register Mobile APP to handle files

  

Hello,

I'm trying to make an Outsystems application on P10 that registers as a target to send PDF files to. The user would be browsing his email, he would click a PDF and if he didn't specify a default program he would get the following dialog at least on Android:

Then the app would somehow process that intent - hopefully by calling a screen or a client action in logic.

The app must be a P10 app - forking Outsystems Now and editing the XML is not an option at this time.

The closest I've seen to do this in cordova is here:

http://ourcodeworld.com/articles/read/101/how-to-list-your-cordova-app-in-open-with-menu-in-android-and-handle-the-intent-event

But I don't think I can use this as is. Can this be done currently on Outsystems? And if so can you point me in the right direction?


Thank you

Hi Ricardo,

I think to be able to do this you would need a Cordova plug-in. Unfortunately, there doesn't seem to be one yet in the Forge. I think there must be some documentation on how to create one's own Cordova plugin and use it, but I can't find it right now.

Hi Ricardo,

Here you can find the documentation on how to add you own Cordova plugin.

https://success.outsystems.com/Documentation/10/Extensibility_and_Integration/Mobile_Plugins/Create_a_Plugin_to_Use_Mobile_Capabilities_in_Your_Application

Best Regards,
Martijn Habraken

Ah, yes, that's the page I was looking for. Thanks Martijn!

Thank you both for your replies. 

I'll try to create a cordova plugin with the required hooks and report back on how it goes. Hopefully it will be at least an half decent plugin and a good contribution for the forge as I believe this feature may be used elsewhere.

Regards,
Ricardo Cebola

Hi Ricardo, I have been looking for a way to "open" an Email attachment with an Outsystems app (e.g. for further processing, such as storage of the attachment) for ages! So this would be very, very valuable. Any progress on it? By the way, it would be important to work on both iOS and Android.


Best, Denis.

Any progress anybody?

I  managed to create a plugin for iOS that can do this and process the document in my app, but my plugin somehow overrides the built-in openurl method of the P10 app, so deep links don't work anymore when I install my plugin. I am not an expert with native languages and I have been struggling for days to "Swizzle" the new method to handle the document url coming from the native OS  with the original openurl method dealing with deep links. I am not able to do it. 

Anybody who can help me with overcoming such problem?