Opening a file in a hybrid app

Thread is closed for posting
3 posts, 0 answers
  1. Novern Holder
    Novern Holder avatar
    10 posts
    Member since:
    Nov 2014

    Posted 10 Mar 2015 Link to this post

    Good day,

    I'm struggling with an issue here.
    I download a file from a WebAPI then save the file locally on the device, but after this I want to open the file (Specifically PDF at the moment but I would like to be able to expand this to any file type).
    Has anyone actually done this?

    Here is a plugin I think would work, but I'm not to sure how to include the .java file in a telerik solution.

    Thanks in advance!
  2. Zdravko
    Zdravko avatar
    657 posts

    Posted 12 Mar 2015 Link to this post

    Hi Andre,

    To open a pdf file on iOS device you should use the InAppBrowser plugin as in our sample app. On Android, the app attempts to open the PDF file in the default browser and the browser launches the default PDF reader app so you need such reader installed.
    For your convenience I slightly modified this sample in order to download pdf file and open it.
    However this could be an option when you attempt to open pdfs and images.

    If you want to open different type of files you can try with the plugin you have found and to do that you will have to import it as described here.
    I don't know how reliable it is but notice that it is designed for Android platform only.


    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

  3. Novern Holder
    Novern Holder avatar
    10 posts
    Member since:
    Nov 2014

    Posted 13 Mar 2015 in reply to Zdravko Link to this post

    Thank you kindly, will give this a look!
Back to Top