masterwok / simple-torrent-android

A torrent client library for Android that utilizes frostwire-jlibtorrent. It supports sequential and simultaneous downloads.
MIT License
95 stars 30 forks source link

[Feature Request] #3

Closed DeevD closed 5 years ago

DeevD commented 5 years ago

Add Speed and file size support for downloading torrent . And local Data base Support?

masterwok commented 5 years ago

Rates can be found on the TorrentSession:

The size of the file(s) being downloaded is represented on the TorrentSessionStatus.bytesWanted property.

Is that what you're looking for?

DeevD commented 5 years ago

Thank bro i found it. Torrent Status and Torrent Info. When application is destroyed torrentSession can be resume?.

masterwok commented 5 years ago

Awesome, no problem!

When the application is stopped/destroyed the torrent session can be recreated and resumed. You will want to have the TorrentSession managed within a foreground service so the download doesn't stop when the device goes to sleep.

DeevD commented 5 years ago

Thank you so much bro.

masterwok commented 5 years ago

Anytime, glad I could help!

DeevD commented 5 years ago

Can you provide example of local database with torrentSession bro. I mean when user is paused shut down application or device session can't be handle bro .

masterwok commented 5 years ago

Sorry, but that sample would be nearly an entire torrent client application. There's essentially going to be four main components you need to implement:

  1. Managing TorrentSession instances within in a foreground service
  2. Listening for TorrentSession events using a TorrentSessionListener
  3. Translating those events into models that can be persisted to a database (I used Room)
  4. Controlling sessions via user events
DeevD commented 5 years ago

:Okie bro no problem . Thank for your suggestions.