Commit b10e6afa9b98829710b19a3dbcdfc3c91b6a67e1
1 parent
557ede64
--no commit message
Showing
2 changed files
with
15 additions
and
8 deletions
src/com/upc/pbe/upcnews/MainActivity.java
@@ -5,8 +5,12 @@ import java.io.IOException; | @@ -5,8 +5,12 @@ import java.io.IOException; | ||
5 | import java.net.MalformedURLException; | 5 | import java.net.MalformedURLException; |
6 | 6 | ||
7 | import android.app.Activity; | 7 | import android.app.Activity; |
8 | +import android.app.DownloadManager; | ||
9 | +import android.content.Context; | ||
8 | import android.content.Intent; | 10 | import android.content.Intent; |
11 | +import android.net.Uri; | ||
9 | import android.os.Bundle; | 12 | import android.os.Bundle; |
13 | +import android.os.Environment; | ||
10 | import android.util.Log; | 14 | import android.util.Log; |
11 | import android.view.Menu; | 15 | import android.view.Menu; |
12 | import android.view.MenuItem; | 16 | import android.view.MenuItem; |
@@ -49,6 +53,17 @@ public class MainActivity extends Activity implements OnClickListener { | @@ -49,6 +53,17 @@ public class MainActivity extends Activity implements OnClickListener { | ||
49 | alertaText = (TextView) findViewById(R.id.textViewAlerta); | 53 | alertaText = (TextView) findViewById(R.id.textViewAlerta); |
50 | alertaText.setVisibility(View.VISIBLE); | 54 | alertaText.setVisibility(View.VISIBLE); |
51 | } | 55 | } |
56 | + /* TESTING ANDROID DOWNLOADMANAGER | ||
57 | + * | ||
58 | + * | ||
59 | + * | ||
60 | + DownloadManager.Request request = new DownloadManager.Request(Uri.parse("http://revistes.upc.es/~imanol/PBE/sample_ep_128k-00001.ts")); | ||
61 | + request.setDescription("Some descrition"); | ||
62 | + request.setTitle("Some title"); | ||
63 | + request.setDestinationInExternalPublicDir(Environment.getExternalStorageDirectory().toString(), "sample_ep_128k-00001.ts"); | ||
64 | + DownloadManager manager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE); | ||
65 | + manager.enqueue(request); | ||
66 | + */ | ||
52 | } | 67 | } |
53 | 68 | ||
54 | public void onClick(View v) { | 69 | public void onClick(View v) { |
src/com/upc/pbe/upcnews/VideoActivity.java
@@ -104,12 +104,4 @@ public class VideoActivity extends Activity { | @@ -104,12 +104,4 @@ public class VideoActivity extends Activity { | ||
104 | video.setVideoLayout(VideoView.VIDEO_LAYOUT_SCALE, 0); | 104 | video.setVideoLayout(VideoView.VIDEO_LAYOUT_SCALE, 0); |
105 | super.onConfigurationChanged(newConfig); | 105 | super.onConfigurationChanged(newConfig); |
106 | } | 106 | } |
107 | - | ||
108 | - // Que coño es esto gueyes??? | ||
109 | - /*@Override | ||
110 | - public boolean onCreateOptionsMenu(Menu menu) { | ||
111 | - //Determina el funcionament al apretar la tecla d'opcions | ||
112 | - getMenuInflater().inflate(R.menu.activity_video, menu); | ||
113 | - return true; | ||
114 | - }*/ | ||
115 | } | 107 | } |
116 | \ No newline at end of file | 108 | \ No newline at end of file |