--- android/TrainInfo/src/dk/thoerup/traininfo/WelcomeScreen.java 2010/05/20 14:03:12 743 +++ android/TrainInfo/src/dk/thoerup/traininfo/WelcomeScreen.java 2011/04/26 15:53:48 1393 @@ -5,7 +5,7 @@ import android.net.Uri; import android.os.Bundle; import android.os.Handler; -import android.os.Message; +import android.util.Log; import android.view.View; import android.view.Window; import android.view.View.OnClickListener; @@ -13,7 +13,8 @@ import com.nullwire.trace.ExceptionHandler; -import dk.thoerup.checkupdates.CheckUpdates; +import dk.thoerup.androidutils.CheckUpdates; +import dk.thoerup.traininfo.provider.ProviderFactory; public class WelcomeScreen extends Activity{ public enum ListType { @@ -26,8 +27,9 @@ @Override public void onCreate(Bundle savedInstanceState) { - requestWindowFeature( Window.FEATURE_NO_TITLE ); + super.onCreate(savedInstanceState); + requestWindowFeature( Window.FEATURE_NO_TITLE ); setContentView(R.layout.welcome); Button nearestButton = (Button) findViewById(R.id.nearest); @@ -45,8 +47,8 @@ ExceptionHandler.register(this, "http://t-hoerup.dk/android/trace.php"); CheckUpdates update = new CheckUpdates(); - update.checkForUpdates(this, "http://t-hoerup.dk/android/traininfo/version.txt", "TrainInfo DK"); - + update.checkForUpdates(this, "http://t-hoerup.dk/android/traininfo/version.txt", "TrainInfo DK", null); + /* Runnable r = new Runnable() { @Override public void run() { @@ -55,8 +57,20 @@ } }; handler.postDelayed(r, 1500); + */ } + + + @Override + protected void onDestroy() { + super.onDestroy(); + ProviderFactory.purgeOldEntries(); //exiting application, do some cleanup + } + + + + class AboutListener implements OnClickListener { @Override @@ -71,7 +85,7 @@ message.append("By Torben H. Nielsen\n"); MessageBox.showMessage(WelcomeScreen.this, message.toString());*/ - Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.t-hoerup.dk/android/traininfo/")); + Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://t-hoerup.dk/android/traininfo/")); startActivity(browserIntent); }