--- android/TrainInfo/src/dk/thoerup/traininfo/WelcomeScreen.java 2009/11/12 10:03:22 500 +++ android/TrainInfo/src/dk/thoerup/traininfo/WelcomeScreen.java 2010/09/24 11:07:44 1131 @@ -4,11 +4,16 @@ 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, @@ -16,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); @@ -33,8 +41,23 @@ Button aboutButton = (Button) findViewById(R.id.about); 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