Hi Folks,
Nettalk 7.28
Clarion 8 (last)
This functionality works great on the desktop, and possibly other devices. I've discovered a problem with Android phones and the android adobe reader.
1. Have a nettalk webserver (non ssl).
2. Have a button on a form which, depending on a number of things, when clicked will "download" a pdf.
3. This code lives in the _SendFile embed of the WebHandler:
self.ForceNoCache = 1
self.ReplyContentType = 'application/pdf'
p_Header = NET:SendHeader+net:DontCache
4. Am running chrome browser on android, go to the page, click the button.
5. Comes up with "Complete action using" dialogue .. I choose Adobe Reader.
6. Error message appears:
Error opening document. Please try again later.
--
So I a-looking, and discover this:
http://stackoverflow.com/questions/12178071/open-a-pdf-document-in-adobe-reader-from-app, which talks about changing Uri.parse(path) to Uri.fromFile(new File(path)) - it also has a link to a java question which apparently answers the issue.
Anyone able to help me work out:
1) If this is the answer, and
2) How to set nettalk to do whatever it is that is being done in that code.
** If you choose "Chrome" to open the pdf on android, it works fine. Opens in Adobe, just a different way I'm guessing. Chrome possibly does the downloading?