From b10e6afa9b98829710b19a3dbcdfc3c91b6a67e1 Mon Sep 17 00:00:00 2001 From: Equip de Desenvolupadors de PBE Date: Tue, 11 Dec 2012 10:24:41 +0000 Subject: [PATCH] --- src/com/upc/pbe/upcnews/MainActivity.java | 15 +++++++++++++++ src/com/upc/pbe/upcnews/VideoActivity.java | 8 -------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/com/upc/pbe/upcnews/MainActivity.java b/src/com/upc/pbe/upcnews/MainActivity.java index cb058c1..06a184d 100644 --- a/src/com/upc/pbe/upcnews/MainActivity.java +++ b/src/com/upc/pbe/upcnews/MainActivity.java @@ -5,8 +5,12 @@ import java.io.IOException; import java.net.MalformedURLException; import android.app.Activity; +import android.app.DownloadManager; +import android.content.Context; import android.content.Intent; +import android.net.Uri; import android.os.Bundle; +import android.os.Environment; import android.util.Log; import android.view.Menu; import android.view.MenuItem; @@ -49,6 +53,17 @@ public class MainActivity extends Activity implements OnClickListener { alertaText = (TextView) findViewById(R.id.textViewAlerta); alertaText.setVisibility(View.VISIBLE); } + /* TESTING ANDROID DOWNLOADMANAGER + * + * + * + DownloadManager.Request request = new DownloadManager.Request(Uri.parse("http://revistes.upc.es/~imanol/PBE/sample_ep_128k-00001.ts")); + request.setDescription("Some descrition"); + request.setTitle("Some title"); + request.setDestinationInExternalPublicDir(Environment.getExternalStorageDirectory().toString(), "sample_ep_128k-00001.ts"); + DownloadManager manager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE); + manager.enqueue(request); + */ } public void onClick(View v) { diff --git a/src/com/upc/pbe/upcnews/VideoActivity.java b/src/com/upc/pbe/upcnews/VideoActivity.java index 1995677..67a489b 100644 --- a/src/com/upc/pbe/upcnews/VideoActivity.java +++ b/src/com/upc/pbe/upcnews/VideoActivity.java @@ -104,12 +104,4 @@ public class VideoActivity extends Activity { video.setVideoLayout(VideoView.VIDEO_LAYOUT_SCALE, 0); super.onConfigurationChanged(newConfig); } - - // Que coño es esto gueyes??? - /*@Override - public boolean onCreateOptionsMenu(Menu menu) { - //Determina el funcionament al apretar la tecla d'opcions - getMenuInflater().inflate(R.menu.activity_video, menu); - return true; - }*/ } \ No newline at end of file -- libgit2 0.22.2