◎위챗 : speedseoul
http://stackoverflow.com/questions/10352259/using-toast-inside-timertask
try this
Timer t = new Timer(false);
t.schedule(new TimerTask() {
@Override
public void run() {
runOnUiThread(new Runnable() {
public void run() {
Toast.makeText(getApplicationContext(), "msg", Toast.LENGTH_LONG).show();
}
});
}
}, 5000);