• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

download several pdf files

 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to download the several pdf files from urls.I have several urls.I need to download them one after another.So what approach should i take?
How to identity whether one pdf is finished the download?
 
Ulf Dittmer
Rancher
Posts: 42969
73
 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks ulf.Actually i have viewpager with several pages.I show the pdf file in each page.So i need to start download the pdf when swipe the page.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does how you use the PDFs have to do with how you download them?
 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually there are several pdf files.I don't need all of them to download.I just need to download the page user visited.So when user goes to a page relevant pdf must start download and shot it?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand the question. I ask again:
What does how you use the PDFs have to do with how you download them?

And, since you seem to have come to the conclusion that the approach discussed in that article wouldn't work for you, how did you come to that conclusion?
 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes.I need to download pdf files from urls.I need to show pdf files in a view pager.I need to downalod the pdf files when user swipe in view pager.So i am asking a good way to this approach.I found using Queue behaviour is match for this. ULF i think this gives the answer.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to download pdf files from urls.

The link I posted shows how to do that. If you have a specific question about that: TellTheDetails

I need to downalod the pdf files when user swipe in view pager. So i am asking a good way to this approach.

And that's where you lose me. I seem to recall that you had code to detect swipes in a ViewPager, so you should be able to trigger downloads at that time. (Of course, if you already know which PDFs to download, you might want to start downloading them as soon as the app is started, in order to eliminate as much wait time for the user as possible.)

I found using Queue behaviour is match for this.

I don't know how were planning to use that class, so if you have a question about that, you need to be more specific: TellTheDetails
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic