You can invoke the runOnUiThread method of Activity within that thread.
activity.runOnUiThread(new Runnable() {
public void run() {
Toast.makeText(activity, "Hello", Toast.LENGTH_SHORT).show();
}
});
© 2024 OneMinuteCode. All rights reserved.