I need to check if the thread running a certain piece of code is the main (UI) thread or not. How can I achieve this? 12 Answers 12 Tags: androidjavamultithreading