I tried to show the toast from the thread.
Toast.makeText(activity.getApplicationContext(), "This is the Toast message", Toast.LENGTH_LONG).show();
but throws the exception
java.lang.RuntimeException:Can't create a handler inside thread that has not called Looper.prepare().
How do I solve this problem? I have put the Looper.myLooper().prepare();
before the Toast.makeText(....).show();
When I have done this it doesn't throw the exception but does not show any toast message.
So how do I solve this problem?
Thanks in advance.