--- android/TrainInfo/src/dk/thoerup/traininfo/WelcomeScreen.java 2011/07/07 19:44:01 1548 +++ android/TrainInfo/src/dk/thoerup/traininfo/WelcomeScreen.java 2011/07/07 20:42:03 1550 @@ -97,6 +97,8 @@ long last = prefs.getLong(stationsreload, 0); long now = System.currentTimeMillis(); + Log.i("TrainInfo", "Last Load: " + last); + if ( (now-last) > (14*24*60*60*1000) ) { new StationLoader(osp).execute( (Void)null); } else { @@ -201,6 +203,7 @@ boolean succeeded; ProgressDialog dlg; OfflineStationProvider osp; + String exMsg; public StationLoader(OfflineStationProvider osp) { this.osp = osp; @@ -213,7 +216,7 @@ succeeded = true; } catch (Exception e) { succeeded = false; - Toast.makeText(WelcomeScreen.this, "Error " + e.getMessage(), Toast.LENGTH_LONG).show(); + exMsg = e.getMessage(); } return null; } @@ -239,6 +242,8 @@ Editor edit = prefs.edit(); edit.putLong(stationsreload, System.currentTimeMillis() ); edit.commit(); + } else { + Toast.makeText(WelcomeScreen.this, "Error " + exMsg, Toast.LENGTH_LONG).show(); } } }