Activity Popup Plugin - using items type URL to share local file

Hello!

The Activity popup is setup properly in my app and I’m able to share an image, text, etc. just fine.

Now I’m trying to share a PDF file that my app generates and saves under the Documents Directory. I’m using system.pathForFile to create a URL to the file as follows:

local itemPathToPDF = system.pathForFile( “report.pdf”, system.DocumentsDirectory )

local items =

{

  { type = “url”, value = itemPathToPDF },

}

When I try to use the Activity popup in my app, the only sharing option presented is AirDrop. When I try to use AirDrop it crashes my app.

Is system.pathForFile() the proper way to create a URL to a local file stored in Document Directory?

Thanks so much for your help!

I know this is old now, but I’m pretty sure the answer to your question is no. Unfortunately, I don’t know how to answer “how do I do it then?” which would probably be the next logical question. :wink:

I know this is old now, but I’m pretty sure the answer to your question is no. Unfortunately, I don’t know how to answer “how do I do it then?” which would probably be the next logical question. :wink: