TorrentStream-Android

by TorrentStream

TorrentStream / TorrentStream-Android

A torrent streamer library for Android based on jlibtorrent

219 Stars 84 Forks Last release: 6 months ago (2.7.0) Other 101 Commits 15 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

TorrentStream-Android Release

A torrent streamer library for Android based on jlibtorrent.

Once built for the Popcorn Time and the Butterproject. Now just a cool library for anyone to use.

How to use

Add Jitpack in your root build.gradle at the end of repositories:

groovy
allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

Add to your dependencies:

dependencies {
    compile "com.github.TorrentStream:TorrentStream-Android:${torrentstreamVersion}"
}

Add to your AndroidManifest.xml (only for saving to the external storage):


Code samples

Create your own

TorrentOptions
instance using the builder and feed it to a new
TorrentStream
.
TorrentOptions torrentOptions = new TorrentOptions.Builder()
                .saveLocation(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS))
                .removeFilesAfterStop(true)
                .build();

TorrentStream torrentStream = TorrentStream.init(torrentOptions); torrentStream.startStream("https://butterpoject.org/test.torrent");

If you want to get status information about the torrent then you might want to use

addListener
to attach a listener to your
TorrentStream
instance.

License

Copyright 2015-2018 Sébastiaan (github.com/se-bastiaan)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.