Android examples for Android OS:Thread
get Thread Info as String
//package com.java2s; import android.os.Looper; public class Main { public static String getThreadInfo() { String textMainThread = Thread.currentThread().getId() == Looper .getMainLooper().getThread().getId() ? " - the MAIN thread!" : " - NOT the MAIN thread!"; return "Thread " + Thread.currentThread().getId() + textMainThread; }// ww w.j a v a 2 s.c o m }