Keyboard hide after send message


hello everyone,
i have develop chatting app(elastic chat). when user send message to other user at time automatically close keyboard rather then open same like whatsapp and hike. what i do for that. i try to using focus() but don’t work it.
please suggest me…
thank you