facebook

saving media files locally

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #350659 Reply

    KevinRevill
    Participant

    Hi There,

    Im new to mobile app building and im struggle to find some info.
    Here is what i need to do. I need to tell my app to go grab a pdf file from a web site and store it locally on the phones sd card space (android). I will be storing a handfull of these says (file1.pdf,file2.pdf,file3.pdf)
    Then from another page. i want to be able to link to file1.pdf. That way it will open in the androids default pdf reader.

    So the questions are.

    1) what would be the js function to i tell my app to grab http://www.domain.com/file1.pdf and save it locally?
    2) what would be the link to place in the page to open up file1.pdf

    Many thanks for looking at my issue.

    Kev

    #350714 Reply

    Hi,

    For downloading files you can use the Phonegap File API, you can find a helpful example here: https://gist.github.com/nathanpc/2464060#file-phonegap_download_example-html-L48

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: saving media files locally

You must be logged in to post in the forum log in