I have tested your solution and want to write my feedback, questions and feature request.
1. What is the update time of main window? When I will see new dialogs? I have a problem. I don't recieve new dialogs. I should exit an application and open again. (Like 2nd my problem)
2. As I understood there are no chat ajax update for now, aren't it? I should go to main window and go back to dialog to see new messages. Or maybe polling interval is too long. I tryed to wait about 1m.
3. Any sound solution for new dialog/message? I think, you can take default sounds. Maybe solution to use it repeatedly (loop or interval between messages) while dialog is not opened by operator.
4. Maybe working as service to:
a. recieve notifications in realtime
b. as I know when there is low memory, OOM kills empty/background applications firstly. So, I wish you protect this and guarantee operator to recieve his messages
5. Eventhough, thank you very much for your solution
It will be very useful for me. It's annoying to use browsers
6. If this should be sent to your forum, sorry, I'm too lazy today
7. P.S. After pressing chat in android app there is a problem, when I can see in android app path to my avatar: /images/avatar/filename.png like a message (:
8. P.P.S Server details doesn't have my avatar. (No image available)