2013-10-03

Global UncaughtExceptionHandler for Android

I recently had the problem that LogCat omitted the stack-traces of exceptions in my code for some unknown reason (maybe thats due to my ORMLite-usage or something). Therefore I added this small method and called it directly beneath the super.onCreate(savedInstanceState) in my onCreate-method. It will provide you with messages and stack-traces to exceptions that otherwise would not be logged.

The method:
private void initUncaughtExceptionHandler() {
        Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {

            @Override
            public void uncaughtException(Thread thread, Throwable ex) {
                Log.e("UncaughtException!", ex.getMessage());
                Log.e("UncaughtException!", Log.getStackTraceString(ex));
            }
        });
    }
Invocation of the method:
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initUncaughtExceptionHandler();
        setContentView(R.layout.main);
        
        [...]
    }

2013-03-10

Android-App WarZ-Time

So I created an Android App called "WarZ-Time". There is not much to say about it. It displays the current server-time & -date of the Zombie-Survival-MMORPG "The WarZ" from Hammerpoint Interactive (with which I am in no way affiliated). This works for all three server-regions (US, Europe & Russia), because the time does not differ between those three. This is kind of logical, because the game plays in Colorado. The only other feature is, that depending on the servertime the wallpaper switches from day to night. Here are some screenshots:


Here is the App: https://play.google.com/store/apps/details?id=com.frozenmilkmeteoroids.warztime
This is a link for purchasing "The WarZ": https://account.playwarz.com/buy/buy.html