Android Push Solution

Source: Internet
Author: User

Moving Push Service is to create a link between a mobile phone and a server that can be sent via this link when a message needs to be sent to the phone.

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.

The next step is about how to resolve the error problem, and see the rest of the full text >>>

Related articles recommended:

how Android and iOS systems are being pushed, why iOS doesn't have a background push

Android Push Solution

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.