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