My application launches a thread to query the web for some data. I want to display a Toast message when nothing is found, but my application always crashes.
I\'ve t
If you're running the Handler from your Activity class, you can set the context by just referencing the .this of your Activity like so:
final Runnable showToastMessage = new Runnable() { public void run() { Toast.makeText(YourActivity.this, "Message", Toast.LENGTH_SHORT).show(); } };