in doInBackground() method of AsyncTask I gave the name to thread
Thread.currentThread().setName("customName").
Now I know that this thread has a name,
Now Looping to check the available threads
for (Thread t : Thread.getAllStackTraces().keySet()) {
if (t.getName().contains("customName")) {
}
}