Sending torrents to Swarm

3rd Party applications can send torrents to Swarm using intents.

Sending a file to Swarm via an Intent

ws.munday.swarm.ADD

Adds a torrent to swarm.
Torrents can be added via file path or URL.

Filesystem:

    String filename="path/to/file.torrent";
    Intent i = new Intent();
    i.setAction("ws.munday.swarm.ADD");
    i.setData(Uri.fromFile(new File(filename)));
    getApplicationContext().startActivity(i);

Url:

    Intent i = new Intent();
    String torrentUrl="http://url.to/the.torrent";
    i.setAction("ws.munday.swarm.ADD");
    i.setData(Uri.parse(torrentUrl));
    getApplicationContext().startActivity(i);


Snark

Swarm releases use a modified version of The Hunting of the Snark Project by Mark J. Wielaard. The project had not been modified since 2003, so I’ve added good number of updates have been added to get it in working order (and working properly on Android.) There are still many tweaks that are needed. Also, in Swarm’s version of Snark, some functions such as the basic http tracker functionality have been disabled and may require some hacking to get going. The code is modified regularly and not well documented at the moment. As [stable] versions are completed they will be posted here.

Download:

Current:
swarm-snark 0.5

Older:
swarm-snark 0.02 (source)