From 2d99b59862f8ccf7de1c627c13a64bc35cbba5b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81bastiaan?= Date: Sat, 2 Apr 2016 15:50:20 +0200 Subject: [PATCH] Fix sample application --- sample/src/main/AndroidManifest.xml | 4 ++-- .../sample/MainActivity.java | 7 ++----- sample/src/main/res/layout/activity_main.xml | 2 +- sample/src/main/res/menu/menu_main.xml | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) rename sample/src/main/java/com/github/se_bastiaan/{torrenstreamer => torrentstreamer}/sample/MainActivity.java (86%) diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index 9cdefd4..538f51f 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -19,7 +19,7 @@ --> + package="com.github.se_bastiaan.torrentstreamer.sample" > @@ -31,7 +31,7 @@ android:label="@string/app_name" android:theme="@style/AppTheme" > diff --git a/sample/src/main/java/com/github/se_bastiaan/torrenstreamer/sample/MainActivity.java b/sample/src/main/java/com/github/se_bastiaan/torrentstreamer/sample/MainActivity.java similarity index 86% rename from sample/src/main/java/com/github/se_bastiaan/torrenstreamer/sample/MainActivity.java rename to sample/src/main/java/com/github/se_bastiaan/torrentstreamer/sample/MainActivity.java index 9daf359..d7cc5ca 100644 --- a/sample/src/main/java/com/github/se_bastiaan/torrenstreamer/sample/MainActivity.java +++ b/sample/src/main/java/com/github/se_bastiaan/torrentstreamer/sample/MainActivity.java @@ -17,7 +17,7 @@ * */ -package com.github.se_bastiaan.torrenstreamer.sample; +package com.github.se_bastiaan.torrentstreamer.sample; import android.annotation.SuppressLint; import android.content.Intent; @@ -39,8 +39,6 @@ import java.io.UnsupportedEncodingException; import java.net.URLDecoder; -import github.se_bastiaan.torrentstreamer.sample.R; - @SuppressLint("SetTextI18n") public class MainActivity extends AppCompatActivity implements TorrentListener { @@ -48,7 +46,7 @@ public class MainActivity extends AppCompatActivity implements TorrentListener { private ProgressBar progressBar; private TorrentStream torrentStream; - private String mStreamUrl = "magnet:?xt=urn:btih:D60795899F8488E7E489BA642DEFBCE1B23C9DA0&dn=Kingsman%3A+The+Secret+Service+%282014%29+%5B720p%5D&tr=http%3A%2F%2Ftracker.yify-torrents.com%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.org%3A80&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Fp4p.arenabg.ch%3A1337&tr=udp%3A%2F%2Fp4p.arenabg.com%3A1337"; + private String mStreamUrl = "magnet:?xt=urn:btih:88594aaacbde40ef3e2510c47374ec0aa396c08e&dn=bbb%5Fsunflower%5F1080p%5F30fps%5Fnormal.mp4&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80%2Fannounce&ws=http%3A%2F%2Fdistribution.bbb3d.renderfarming.net%2Fvideo%2Fmp4%2Fbbb%5Fsunflower%5F1080p%5F30fps%5Fnormal.mp4"; @Override protected void onCreate(Bundle savedInstanceState) { @@ -89,7 +87,6 @@ public void onClick(View v) { button.setText("Start stream"); return; } - //torrentStream.startStream("https://yts.to/torrent/download/D60795899F8488E7E489BA642DEFBCE1B23C9DA0.torrent"); torrentStream.startStream(mStreamUrl); button.setText("Stop stream"); } diff --git a/sample/src/main/res/layout/activity_main.xml b/sample/src/main/res/layout/activity_main.xml index 2072b9c..57744e2 100644 --- a/sample/src/main/res/layout/activity_main.xml +++ b/sample/src/main/res/layout/activity_main.xml @@ -22,7 +22,7 @@ android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" - android:paddingBottom="@dimen/activity_vertical_margin" tools:context="com.github.se_bastiaan.torrenstreamer.sample.MainActivity" + android:paddingBottom="@dimen/activity_vertical_margin" tools:context="com.github.se_bastiaan.torrentstreamer.sample.MainActivity" android:orientation="vertical">