To update your UI in a thread-safe fashion, use the runOnUiThread() method:
runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(getApplicationContext(),
"Some message to display", Toast.LENGTH_LONG).show();
}
});
No comments:
Post a Comment