Summary : Mobile Push service , is through the establishment of a mobile phone and server link, when the message needs to be sent to the mobile phone, through this link to send.
The implementation of Android push includes:
Scenario 1, using C2DM services (Google Cloud Messaging)
Introduction : Google launched the cloud messaging service, the second generation of G2DM.
Pros : Google offers services, native, and simple, without the need to implement and deploy the server.
Cons : Android version limit (must be greater than 2.2 version), the service is not stable in the country, users need to bind Google account, limited by Google.
Scenario 2, using the XMPP protocol (OpenFire + Spark + Smack)
Introduction : Communication protocol based on XML protocol, formerly known as Jabber, has been standardized by the IETF International Organization for Standardization.
Advantages : The protocol is mature, strong, extensible, mainly used in many chat systems, and there is open source Java version of the development of the example ANDROIDPN.
Disadvantage : The protocol is more complex, redundant (based on XML), charge flow, charge power, and the cost of deploying hardware is high.
Scenario 3, using the MQTT protocol
Summary : A lightweight, agent-based "Publish/subscribe" mode message Transfer Protocol.
Advantages : The protocol is concise, small, extensible, save traffic, power saving, applied to the enterprise domain, and has a C + + version of the service-side components RSMB.
disadvantage : not mature enough, achieve more complex, service-side components RSMB not open source, the deployment of hardware cost is high.
Scenario 4, use of third-party push services
Introduction : Using a third-party push service via the Embed SDK, the mainstream
Google Cloud push service : In view of the special situation in China, most of the domestic mobile phones have cut off Google services, so this approach is not very realistic.
Baidu Cloud Push service : This push scheme implementation is relatively simple, directly integrated with the relevant SDK, you can push, and the service side of the SDK has a Php,java,python version, you can also directly push related messages through the URL.
Aurora Push : This document is more complete, known as a 3-minute quick demo, the integration is relatively simple.
Advantages : Stable, mature, save development and exploration time, relative to their own low cost of development, push management interface and statistical procedures to improve.
Cons : There are procedural embedding concerns.
The following small part of the simple introduction of the third method of the use of the scheme, hoping to help developers in the development process less detours ~
1, first download RSMB package, and unzip, find the corresponding server folder, Small series show is LINUX_IA32, this support a variety of servers.
2, the directory and the files inside the server, into the command line and into the directory, and then self./broker This launches the push service.
3, ready to push the page (via web page for push test) Download the PHP side of the Push code ( click here to download ), unzip into etc directory change config.php IP address for your server IP address.
4, open the corresponding URL can see the following page
The server status is displayed as online instructions for the servers to start correctly.
5. Start preparing Android client below ( point me to my point )
Download and unzip-import eclipse--> modify the IP address of the Pushservice in Mqtt_host for your server-run
Start the push service, then type the string of characters into the upper input box on the top page, and enter the content to push below.
If the following error occurs ~
"Click to see more"
Devstore Technical Support: Android Push solution