Now, to create an application, you need to push the notification to the client. I thought of using c2dm. However, the test was not very reliable and the efficiency was not high. But the occasional opportunity to find this site: http://www.push-notification.org/index.php
First, we need to declare that many Android apps in China now have the push notification function, but most of them arePull ModeThat is, the client actively requests data from the server. Clients including Sina Weibo (requests are made every two minutes). This method is not to mention power consumption. Many users are still on 2G networks, and traffic is a problem.
However, ifPush methodThat is, the server actively pushes messages to our mobile phone, which can greatly save traffic and reduce power consumption. More importantly, the real-time performance is very good.
So the website above adopts this method. (The real-time communication between the server and the client is nothing more than a socket. By establishing a socket service, the push mechanism is defined ).
I think it is very good. Awesome.
Cut a chart to put up, if you want to see detailed documentation, you can click the URL http://www.push-notification.org/index.php