Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

Commit

Permalink
Fix sample application
Browse files Browse the repository at this point in the history
  • Loading branch information
se-bastiaan committed Apr 2, 2016
1 parent 52665df commit 2d99b59
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="github.se_bastiaan.torrentstreamer.sample" >
package="com.github.se_bastiaan.torrentstreamer.sample" >

<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
Expand All @@ -31,7 +31,7 @@
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.github.se_bastiaan.torrentstreamer.sample.MainActivity"
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -39,16 +39,14 @@
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

import github.se_bastiaan.torrentstreamer.sample.R;

@SuppressLint("SetTextI18n")
public class MainActivity extends AppCompatActivity implements TorrentListener {

private Button button;
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) {
Expand Down Expand Up @@ -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");
}
Expand Down
2 changes: 1 addition & 1 deletion sample/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">

<Button
Expand Down
2 changes: 1 addition & 1 deletion sample/src/main/res/menu/menu_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" tools:context="com.github.se_bastiaan.torrenstreamer.sample.MainActivity">
xmlns:tools="http://schemas.android.com/tools" tools:context="com.github.se_bastiaan.torrentstreamer.sample.MainActivity">
<item android:id="@+id/action_settings" android:title="@string/action_settings"
android:orderInCategory="100" app:showAsAction="never" />
</menu>

0 comments on commit 2d99b59

Please sign in to comment.