Giter Club home page Giter Club logo

androiddownloadmanger's People

Contributors

matsuhiro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

androiddownloadmanger's Issues

Other Info.

Hi.
I'm trying to use your library.
So far so good.
But I'm not able to start multiple downloads at the same time.

In my situation, I have a listview and an OnItemClickListener().
Then, onItemClick, I launch the download (I modified DownloadTask to accept the destination filename) with:

try {
    DownloadTask dt = new DownloadTask(
            this, linkString, filename, pathString, myDownloadTaskListener);
    dt.execute();
} catch (MalformedURLException e) {
    e.printStackTrace();
}

While done quickly on multiple items, downloads seems to start in sequence anyway.

Do you have any hint?
Thanks.

EDIT: It came out that the solution is executing the AsyncTask with:

dt.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);

Now I have to find a way to keep track of the different thread IDs for your DownloadTaskListener().

EDIT 2: I used some maps to link every progress to different IDs, i.e.: Map<Long, Integer> mDownloadPercentMap = new HashMap<Long, Integer>();
and then in DownloadTask#onProgressUpdate:

mDownloadPercent = (int) ((mDownloadSize + mPreviousFileSize) * 100 / mTotalSize);
Maps.mDownloadPercentMap.put(mThreadId, mDownloadPercent);

Next goal: find out how to cancel a specific download (since more than one may be running at the same time).

EDIT 3: Ok, I've done this too. Anyway I'll close here to stop spamming your Issues ;) and post my forked version.

Thanks.

Change queue order

Please add option to change queue order and automatic retry in youtube downloader.

Usage info.

Hi matsuhiro,
I wanted to ask for some documentation about this library usage, but in the mean time I'm finding my way and I have to say that it's really amazing!

May I briefly ask if "pause / resume" for downloads is implemented?
thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.