howto change a value in a TimerTask wichout crashing because of a other thread in android?
<p>i posted a question (<a href="http://stackoverflow.com/questions/10136620/how-to-change-something-in-a-new-timertask-action-in-android/10136688#10136688">here</a>) about how to change UI elements in a timer task, this is fine now.</p>

<p>but when i have a code like this:</p>

<pre><code>        countInt = 0;
        timer = new Timer();
        timer.schedule(new TimerTask() {
            public void run() {
                countInt = countInt + 1;
            }
        }, 1000);
</code></pre>

<p>the counterInt var is saved in the activity where also this code is in.</p>

<p>how to change this value without crashing?</p>
