diff --git a/src/com/upc/pbe/upcnews/MainActivity.java b/src/com/upc/pbe/upcnews/MainActivity.java index 4a2a279..43e169e 100644 --- a/src/com/upc/pbe/upcnews/MainActivity.java +++ b/src/com/upc/pbe/upcnews/MainActivity.java @@ -3,11 +3,14 @@ package com.upc.pbe.upcnews; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; +import java.util.List; import android.app.Activity; import android.app.DownloadManager; import android.content.Context; import android.content.Intent; +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageManager; import android.net.Uri; import android.os.Bundle; import android.os.Environment; @@ -51,6 +54,10 @@ public class MainActivity extends Activity implements OnClickListener { /* * NO SEMBLA QUE FUNCIONI (AIXO COMPROVA LA LLIBRERIA, NO LA APP) * PROVAR CLASE D'ANDROID PACKAGEMANAGER PER OBTENIR LLISTA D'APPS INSTALADES + * QUE ALGU HO MIRI AL SEU MOVIL/TABLET, AL EMU NO PUC :( :( :( + PackageManager pm = getPackageManager(); + List apps = pm.getInstalledApplications(0); + (recorrer la llista per veure si esta Vitamio) */ alerta = (ImageView) findViewById(R.id.imageViewAlerta); alerta.setVisibility(View.VISIBLE);