Skip to content
Snippets Groups Projects
Commit 47931969 authored by sergsan's avatar sergsan
Browse files

Entrega TFG

parent 83f1529c
Branches
Tags
No related merge requests found
......@@ -68,7 +68,7 @@ public class Background extends Service {
notificationManager = getSystemService(NotificationManager.class);
Notification notification = crearNotification();
if(!gpsIncorporado()){
Log.e("AVISO", "No se ha detectado GPS, se usará otro proveedor de ubicación.");
Log.d("AVISO", "No se ha detectado GPS, se usará otro proveedor de ubicación.");
}
startForeground(ID, notification);
......
......
......@@ -13,11 +13,11 @@ public class Configuracion {
//Variables con valores por defecto
public static String URL_SERVIDOR = "https://trackcare.app.bluece.eu/api/positions";
public static String TELEFONO = "638749180";
public static long INTERVALO_MONITORIZACION_UBICACION = 900000; //En milisegundos
public static int MODO_USO = 2; // 1 = Modo alta prioridad se respeta el intervalo. 2= Modo ahorro bateria, no se respeta el intervalo
public static long INTERVALO_MONITORIZACION_UBICACION = 30000; //En milisegundos
public static int MODO_USO = 1; // 1 = Modo alta prioridad se respeta el intervalo. 2= Modo ahorro bateria, no se respeta el intervalo
public static long INTERVALO_COMPROBACION_ACELEROMETRO = 60000; //En milisegundos
public static int COMPROBACIONES_DEFECTO_ACELEROMETRO = 5;
public static long INTERVALO_COMPROBACION_ACELEROMETRO = 10000; //En milisegundos
public static int COMPROBACIONES_DEFECTO_ACELEROMETRO = 2;
public static float UMBRAL_VALORES_ACELEROMETRO = 0.2f;
public static float UMBRAL_VALORES_PROXIMIDAD = 3.0f;
......
......
......@@ -48,7 +48,6 @@ public class ListenerAcelerometro implements SensorEventListener {
long tiempoAhora = System.currentTimeMillis();
if((tiempoAhora-tiempoUltimo) > configuracion.getIntervaloComprobacionAcelerometro()){
Log.d("Comprobacion acelerometro:", String.valueOf(enComprobacion));
if(!enComprobacion){
float calculo = Math.abs(valoresActuales[0]-valoresAnteriores[0]) + Math.abs(valoresActuales[1]-valoresAnteriores[1]) +
Math.abs(valoresActuales[2]-valoresAnteriores[2]);
......
......
......@@ -106,8 +106,7 @@ public class MainActivity extends AppCompatActivity {
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
}
if (!locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
Log.e("ERROR", "No se encuentra un proveedor de GPS disponible");
finish();
Log.d("ERROR", "No se encuentra un proveedor de GPS disponible");
} else {
Intent serviceIntent = new Intent(this, Background.class);
serviceIntent.putExtra("proximidad", tieneProximidad);
......@@ -116,7 +115,6 @@ public class MainActivity extends AppCompatActivity {
}
} else {
Log.d("Error", "No se han otrogado permisos");
finish();
}
}
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment