diff --git a/res/values/strings.xml b/res/values/strings.xml
index 9febb11..c52e8ac 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -39,7 +39,7 @@
- 2
0
- Alerta! Llibreries de Vitamio no instalades!
+ Alerta! Llibreries de Vitamio no instal·lades!
Alerta!
\ No newline at end of file
diff --git a/src/com/upc/pbe/upcnews/MainActivity.java b/src/com/upc/pbe/upcnews/MainActivity.java
index 43e169e..be7e0b1 100644
--- a/src/com/upc/pbe/upcnews/MainActivity.java
+++ b/src/com/upc/pbe/upcnews/MainActivity.java
@@ -3,17 +3,12 @@ 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.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
-import android.os.Environment;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
@@ -34,7 +29,8 @@ public class MainActivity extends Activity implements OnClickListener {
private TextView URLText, alertaText;
@Override
- public void onCreate(Bundle savedInstanceState){
+ public void onCreate(Bundle savedInstanceState)
+ {
//Creem el layout
super.onCreate(savedInstanceState);
setContentView(R.layout.main_activity);
@@ -49,21 +45,18 @@ public class MainActivity extends Activity implements OnClickListener {
buttonDescarrega = (ImageButton) findViewById(R.id.button);
buttonDescarrega.setOnClickListener(this);
updateURL();
- //Mostrem el missatge d'alerta si Vitamio no esta instalat
- if(!io.vov.vitamio.LibsChecker.checkVitamioLibs(this)){
- /*
- * 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)
- */
+ PackageManager pm = getPackageManager();
+ try
+ {
+ pm.getApplicationInfo("io.vov.vitamio", 0);
+ }
+ catch (NameNotFoundException e)
+ {
alerta = (ImageView) findViewById(R.id.imageViewAlerta);
alerta.setVisibility(View.VISIBLE);
alertaText = (TextView) findViewById(R.id.textViewAlerta);
alertaText.setVisibility(View.VISIBLE);
- }
+ }
/*
* TESTING ANDROID DOWNLOADMANAGER NATIU
*
@@ -139,10 +132,10 @@ public class MainActivity extends Activity implements OnClickListener {
/*
* COSAS POR HACER
* (RELEASE-CRITICAL) Lentitud descarga -- Todos (este miercoles)
- * (SEVERE) Crash preferences (Me sigue saliendo O.o)
+ * (NORMAL) Evitar k salga el panel de preferencias dentro de preferencias (no es crucial)
* (NORMAL) Poner la defaultURL al server de PBE
* (WISHLIST) Descarga en segundo plano (Mejora dificil)
- * (WISHLIST) Añadir gif Imanol bailando (Easter eggs? vais en serio? XDDDDDDDDDDDD)
+ * (WISHLIST) A�adir gif Imanol bailando (Easter eggs? vais en serio? XDDDDDDDDDDDD)
* Borrar esta puta mierda
*/
}
diff --git a/src/com/upc/pbe/upcnews/VideoActivity.java b/src/com/upc/pbe/upcnews/VideoActivity.java
index 67a489b..064cd56 100644
--- a/src/com/upc/pbe/upcnews/VideoActivity.java
+++ b/src/com/upc/pbe/upcnews/VideoActivity.java
@@ -26,10 +26,6 @@ public class VideoActivity extends Activity {
//Creem el layout
super.onCreate(savedInstanceState);
- if (!io.vov.vitamio.LibsChecker.checkVitamioLibs(this))
- {
- return;
- }
setContentView(R.layout.activity_video);
video = (VideoView) findViewById(R.id.VideoView1);
//Creem un listener associat al fi de l'activitat (el fi de cada ts)