Commit 0d64c7c02d40ce37d167f9ba102b235bffe03b4b

Authored by Imanol-Mikel Barba Sabariego
1 parent 42cd9bb8

--no commit message

src/com/upc/pbe/upcnews/MainActivity.java
... ... @@ -3,11 +3,14 @@ package com.upc.pbe.upcnews;
3 3 import java.io.File;
4 4 import java.io.IOException;
5 5 import java.net.MalformedURLException;
  6 +import java.util.List;
6 7  
7 8 import android.app.Activity;
8 9 import android.app.DownloadManager;
9 10 import android.content.Context;
10 11 import android.content.Intent;
  12 +import android.content.pm.ApplicationInfo;
  13 +import android.content.pm.PackageManager;
11 14 import android.net.Uri;
12 15 import android.os.Bundle;
13 16 import android.os.Environment;
... ... @@ -51,6 +54,10 @@ public class MainActivity extends Activity implements OnClickListener {
51 54 /*
52 55 * NO SEMBLA QUE FUNCIONI (AIXO COMPROVA LA LLIBRERIA, NO LA APP)
53 56 * PROVAR CLASE D'ANDROID PACKAGEMANAGER PER OBTENIR LLISTA D'APPS INSTALADES
  57 + * QUE ALGU HO MIRI AL SEU MOVIL/TABLET, AL EMU NO PUC :( :( :(
  58 + PackageManager pm = getPackageManager();
  59 + List<ApplicationInfo> apps = pm.getInstalledApplications(0);
  60 + (recorrer la llista per veure si esta Vitamio)
54 61 */
55 62 alerta = (ImageView) findViewById(R.id.imageViewAlerta);
56 63 alerta.setVisibility(View.VISIBLE);
... ...