This is a migrated thread and some comments may be shown as answers.

use native pdf viewer of mobile device

1 Answer 263 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 2
Martin asked on 08 Nov 2013, 12:53 PM
Hello,

I do have a Kendo UI Mobile app which I created with the VS Icenium extension. My question is if it is possible to open remote pdf documents with the native pdf viewer which is installed on a mobile device.

Currently, I'm using this code in order to open a document:
        < ... >
        if (device.platform === "Android") {
            window.open(data.uri, '_blank');
        }
        else {
            window.open(data.uri, '_system');
        }
        < ... >
This opens the browser and downloads the file, which is retrieved from a wep.api .NET MVC webservice. On iOS it works quite well. But on Android it opens the browser and starts the file download in the background and the document is not opened in the browser. It is necessary to pull down the message center in order to open the file.

But like I said, it would be great if I could check if a pdf viewer is installed on iOS / Android and ask the user to open the document with it otherwise opening the file in the browser using the code from above.

Additional, I don't know how to pass the autherize accesstoken which I'm using to secure my MVC webservice. Personally, I don't like the idea to pass the accesstoken in the querystring parameter. Is there a better way something like using ajax?

Searching the internet the only option I was able to find was pdf.js (which I wasn't able to implement into my app).

I'm an absolute beginner with HTML5, jquery, Kendo UI Mobile etc. and it would be great if you guys could give me your help!

Thank you in advance!

Regards,
Martin

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 12 Nov 2013, 11:52 AM
Hi Martin,

These questions are not directly related to functionality or features that Kendo UI offers and are out of scope of our support services. Thank you in advance for your understanding.

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Martin
Top achievements
Rank 2
Answers by
Iliana Dyankova
Telerik team
Share this question
or