--- android/TrainInfo/src/dk/thoerup/traininfo/WelcomeScreen.java 2010/01/29 05:44:09 568 +++ android/TrainInfo/src/dk/thoerup/traininfo/WelcomeScreen.java 2010/09/24 11:07:44 1131 @@ -1,16 +1,19 @@ 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.view.View; import android.view.Window; import android.view.View.OnClickListener; import android.widget.Button; +import com.nullwire.trace.ExceptionHandler; + +import dk.thoerup.androidutils.CheckUpdates; + public class WelcomeScreen extends Activity{ public enum ListType { ListNearest, @@ -18,10 +21,13 @@ ListFavorites } + Handler handler = new Handler(); + @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); @@ -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