@Override public void onReceive(Context appContext, Intent intent) { context = appContext; loc = Localizator.geoLocate(context); if (loc != null) { URLForecast = Conversor.getUrlForecast(loc); /* * Toast.makeText(context, * "¡Vibration Mode On porque el tiempo se ha terminado!", * Toast.LENGTH_LONG).show(); */ // Define la vibracion del telefono /* * Vibrator vibrator = (Vibrator) context * .getSystemService(Context.VIBRATOR_SERVICE); * vibrator.vibrate(1000); */ prefs = context.getSharedPreferences(Values.getPrefs(), Context.MODE_PRIVATE); prefs.edit().putBoolean("active", true).commit(); check_server(); } else { Log.e(LogDavid, "LOC NULL"); if (!Localizator.isProviderEnabled(appContext)) { Notifications notif = new Notifications(appContext); notif.providerDisabled(); } else { } } }