I´m trying to open a PDF via a http-URL from our server.
Adobe Reader 11 is installed on the devices but if i want to open the URL with
B4X:
Dim i As Intent 'Requires a reference to the Phone library
i.Initialize(i.ACTION_VIEW, "http://domain.tld/attachments/pdf/"&Value) ' Value is the name of the PDF
i.SetType("application/pdf")
i.WrapAsIntentChooser("Choose PDF Viewer")
StartActivity(i)
i get the message "No application can perform this action". Open the URL in a browser on my PC opens that PDF with no problem.
The code is used in a company-intern App.
So if i need a special app X to do that i can declare it as "must have installed app". That would be no problem.
I wanted it to not need to download it. But if there is nothing i can do to get this to work then i´ll go the way to download it, copy the pdf to SDCard and then i´ll call an intent.
In theory, yes. But not in real life ;-/ I´ve tried this but with this i always get the message "No application can perform this action" too.
So it seems that i have to download the pdf and copy it to SDcard...