Sunday, March 2, 2014

android how to download files management function? ? ? ? ?


With android implementation file download function. Similar UC, QQ browser to download the same function, click to download the file downloaded in the background, the program can jump to other activity, the jump button when clicking the Download Manager to download the management interface can be seen being downloaded or completed already downloaded files for download unfinished download files can be suspended. How do I achieve?<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Has now achieved a single task to download, the progress achieved. But can not exit the management interface, how to add a download task? ?
Reply:
This looks like a very simple ah, background downloading, through Service from AsynTask on it, and then use the List when multiple download files stored objects, start the download, pause the download is complete you can use to control the state of the file object.
Reply:
reference to the second floor lingang1359 reply:
this seemingly very simple ah, background downloading, through the Service from AsynTask on it, and then when using multiple download List store file objects, start the download, pause, the download is complete you can use to control the state of the file object.

You say you can achieve, but how to achieve the program can jump to other activity, the jump button when clicking the Download Manager to download the management interface can be seen being downloaded or completed file has been downloaded
Reply:
How to add download task? seeking expert advice!
Reply:
Take List object inside the file and get the state on it, ah, if you need long-term storage, it is recommended to get hold of the table saved.
Reply:
references, 5th Floor lingang1359 reply:
take List files inside the object and obtain status on it, ah, if you need long-term storage, it is recommended to get hold of the table kept together.
download manager each time you jump from the web, are re-execute the onCreate method, how to solve this?
Reply:
How to create a download task? ? ?
Reply:

Seek advice ah! ! !
Reply:
Notification (), from a thread, use a variable to control the switch.
Reply:
reference to the 6th floor shang_515 reply:
references, 5th Floor lingang1359 reply:

Take List object inside the file and get the state on it, ah, if you need long-term storage, it is recommended to get hold of the table saved.
Each time you jump to the download manager from the web, are re-execute the onCreate method, how to solve this?


This did not understand what it meant, executive onCreate view the download does not conflict with it.

Added a new download task directly download object, set its current state is downloading, then go inside the store to the List, the Download Manager interface to take out classified according to the different states can be
Reply:
reference to the 10th floor lingang1359 reply:
reference to the 6th floor shang_515 reply:
References, 5th Floor lingang1359 reply:

Take List object inside the file and get the state on it, ah, if you need long-term storage, it is recommended to get hold of the table saved.
Each time you jump to the download manager from the web, are re-execute the onCreate method, how to solve this?


This did not understand what it meant, executive onCreate view the download does not conflict with it.

Added a new download task directly download object, set its current form ......


My Download Manager is an Activity, the download page is a page that is the download link on the page, I mean, click on the download link, jump download manager, download, and then return the page to continue browsing the Web (via download manager verified at this time The Activity has Destroy), would like to see it continue the download link to download the point, which is once again jump to the download manager. Then there should be two download task, but every time I jump to the download manager is only a recent download task, the task is not displayed in front of the download (the actual download in the background), how to display all the download task? Every jump download manager are re-created a new Activity, how to do what I want to function?
Reply:

Reply:
Well you can consider the thread pool.
Reply:
Well, with the database. . .
Reply:
Two, right? start service with the activity does not matter. You create activity and service to those with nothing to fall off.
Reply:
Do you realize yet I recently encountered this problem
Reply:
Android comes DownloadManager, functions to achieve a more comprehensive

No comments:

Post a Comment