I am working on a similar requirement and look at the fact that you can show feedback, for example, by typing / lastseen, etc., according to my knowledge based on the XMPP solution.
you can try using an accessible xmpp server such as ejabberd / mangooseim (open source) by installing it on your server and using asmack or any other java client side library to exchange information with your server. (A lot of tutorials are available for this).
With this great setup, you can enter a scene where you can get status, such as “typing”, “leaving”, whatsapp, as well as some chat clients, such as gtalk / pidgin displays.
It would be rude to give an idea of how existing chat clients work.
Ejabberd is fully written in erlang, and if you want to extend any functionality, you need knowledge of erlang. (It is specially designed for highly competitive fault-tolerant and non-stop systems, which was useful in chat applications.
GCM will definitely be able to communicate between android phones 99.99% of the times with a slight delay, but if you want to have roster status like regular chat apps, you will have to completely reinvent the wheel.
Update:
Here are the considerations.
from client A to client B I want to send chat messages with usurers and do not need to store messages on any central server, but only on clients - XMPP (for example, whatsapp)
if you require all data to be stored on the server - XMPP with sql driver or mongodb / gcm driver (depending on your time and resources)
if you need communication between devices, not necessarily chat, then gcm should be enough. I am currently using this approach in my application, which is located in real time on a beta store, and in most cases it works great. At the moment, I have not seen most of the bottle necks.