This is the way I have to show the Toast
for 500 milliseconds. Though, it\'s showing more than a second.
Toast.makeText(LiveChat.this, \"Typing\
I tried different method and this method works for me
final Toast mytoast = Toast.makeText(getApplicationContext(), jsonObject.getString("response_message"), Toast.LENGTH_SHORT);
mytoast.show();
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
mytoast.cancel();
}
}, 5000);// 5 sec