The current push situation has been broadly available, can be pushed normally. But to use in the actual production, to improve a lot of places.
The original version, the message will not be re-sent. If the message is lost, or if the user is not online, the message will not be sent again. So, all these problems are to be solved.
There is also a lot of discussion on the Internet, which is about these kinds of situations. CSDN has a "cake steamed bread dipped in rice" programmer, the idea of these problems is also good, is to take the unsent information to the repository, and the state to mark whether the information sent, to be processed.
I was to take another way, this way, is a netizen first proposed. To the offline message, is sent after the library, and to record the user's information, it is easy for the next login to send. For sending out, for some reason the situation is lost, is to take three times the situation (this idea is the boss proposed), my design is, after sending, open the resend thread, wait a few seconds, if the client has responded, this will not need to send again. Do not respond to save, wait for the next connection to send again.
Here are some workarounds for ANDROIDPN bugs:
http://blog.csdn.net/yhjsspz/article/details/11980635
http://blog.csdn.net/zranye/article/details/7802017