Skip to content

philipphenkel/ttorrent-android-service

Repository files navigation

ttorrent-android-service

Build Status Download

Description

ttorrent-android-service is an Android BitTorrent library with strong focus on ease of use and simple integration into your projects. All requests are handled on a single worker thread in an IntentService and thus your application can perform long-running download operations in the background by design.

The implementation of the BitTorrent protocol itself is provided by ttorrent.

How to use

To get started with ttorrent-android-service in your Android project, all you need is to declare the Gradle dependency.

dependencies {
    compile 'de.sulaco.bittorrent:ttorrent-android-service:0.2.3'
}

Example Code

You can either use BitTorrentDownloadService directly or use BitTorrentDownloadManager that encapsulates the communication with the IntentService. More details are available in our example projects.

    BitTorrentDownloadManager bitTorrentDownloadManager = new BitTorrentDownloadManager(context);
    
    DownloadRequest request = new DownloadRequest()
        .setTorrentFile(Uri.parse( "/storage/emulated/0/test/baden-wuerttemberg.torrent"))
        .setDestinationDirectory(Uri.parse( "/storage/emulated/0/test/"));
    
    bitTorrentDownloadManager.enqueue(request);

License

Copyright (C) 2016 Philipp Henkel

Licensed under the Apache License, Version 2.0. See LICENSE file for more details.

About

Android BitTorrent Service based on ttorrent

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages