--- android/TrainInfo/src/dk/thoerup/traininfo/WelcomeScreen.java 2010/01/29 05:44:09 568 +++ android/TrainInfo/src/dk/thoerup/traininfo/WelcomeScreen.java 2010/06/26 08:04:20 911 @@ -1,16 +1,20 @@ package dk.thoerup.traininfo; -import com.nullwire.trace.ExceptionHandler; - import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; +import android.os.Handler; +import android.os.Message; import android.view.View; import android.view.Window; import android.view.View.OnClickListener; import android.widget.Button; +import com.nullwire.trace.ExceptionHandler; + +import dk.thoerup.checkupdates.CheckUpdates; + public class WelcomeScreen extends Activity{ public enum ListType { ListNearest, @@ -18,6 +22,8 @@ ListFavorites } + Handler handler = new Handler(); + @Override public void onCreate(Bundle savedInstanceState) { requestWindowFeature( Window.FEATURE_NO_TITLE ); @@ -37,8 +43,21 @@ aboutButton.setOnClickListener( new AboutListener() ); 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", null); + /* + Runnable r = new Runnable() { + @Override + public void run() { + View splash = findViewById(R.id.splash); + splash.setVisibility(View.GONE); + } + }; + handler.postDelayed(r, 1500); + */ } - + class AboutListener implements OnClickListener { @Override