Commit 0d64c7c02d40ce37d167f9ba102b235bffe03b4b
1 parent
42cd9bb8
--no commit message
Showing
1 changed file
with
7 additions
and
0 deletions
src/com/upc/pbe/upcnews/MainActivity.java
@@ -3,11 +3,14 @@ package com.upc.pbe.upcnews; | @@ -3,11 +3,14 @@ package com.upc.pbe.upcnews; | ||
3 | import java.io.File; | 3 | import java.io.File; |
4 | import java.io.IOException; | 4 | import java.io.IOException; |
5 | import java.net.MalformedURLException; | 5 | import java.net.MalformedURLException; |
6 | +import java.util.List; | ||
6 | 7 | ||
7 | import android.app.Activity; | 8 | import android.app.Activity; |
8 | import android.app.DownloadManager; | 9 | import android.app.DownloadManager; |
9 | import android.content.Context; | 10 | import android.content.Context; |
10 | import android.content.Intent; | 11 | import android.content.Intent; |
12 | +import android.content.pm.ApplicationInfo; | ||
13 | +import android.content.pm.PackageManager; | ||
11 | import android.net.Uri; | 14 | import android.net.Uri; |
12 | import android.os.Bundle; | 15 | import android.os.Bundle; |
13 | import android.os.Environment; | 16 | import android.os.Environment; |
@@ -51,6 +54,10 @@ public class MainActivity extends Activity implements OnClickListener { | @@ -51,6 +54,10 @@ public class MainActivity extends Activity implements OnClickListener { | ||
51 | /* | 54 | /* |
52 | * NO SEMBLA QUE FUNCIONI (AIXO COMPROVA LA LLIBRERIA, NO LA APP) | 55 | * NO SEMBLA QUE FUNCIONI (AIXO COMPROVA LA LLIBRERIA, NO LA APP) |
53 | * PROVAR CLASE D'ANDROID PACKAGEMANAGER PER OBTENIR LLISTA D'APPS INSTALADES | 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 | alerta = (ImageView) findViewById(R.id.imageViewAlerta); | 62 | alerta = (ImageView) findViewById(R.id.imageViewAlerta); |
56 | alerta.setVisibility(View.VISIBLE); | 63 | alerta.setVisibility(View.VISIBLE); |