I start a timer in activity1
. And in the timer task, I run some code continuously for a long time. Then I sometimes need to start activity2
like below.
Intent intent = new Intent();
intent.setClass(Tomato.this, History.class);
startActivity(intent);
But then error occurs:
FATAL EXCEPTION: timer-1
Could anyone help?
Further:
I tested again, and found that this error didn't occur every time. Now I cannot even repeat it. Thanks for all of you!