Analysis of Android push technology (1)-Overview

Source: Internet
Author: User

In today's age of information explosion, people are almost numb to all kinds of information and information that are everywhere. A large number of irrelevant or even junk information constantly harass people's nerves, so personalized and social applications are also popular. For example, some news clients send specified news content to users at intervals or when specific news occurs according to their usage habits or subscription requirements; for example, some commonly used instant messaging software such as instant messaging, chat, Gtalk, and mail can send private information to the user's terminal in real time. The technology behind this is message pushing.

The message push discussed in this article refers to the process of transmitting information in a specific format from the server to the mobile terminal device. The biggest difference from traditional server-to-server communication lies in the uncertainty of mobile terminals. For example, the server is like the "water" in Beijing.Cube"The swimming pool is well known and has a clear and fixed address (IP address or domain name). You can easily find her when you want to visit the" Water Cube. However, in turn, it is difficult for "Water Cube" to find a specific "Tourist" because each "Tourist" does not have a definite address (the IP address may be changed every time you log on to the network ).

How can we find "Tourists" scattered everywhere at any time? Mobile Operation service providers provide an effective way-SMS. With the unique identifier (mobile phone number) of the mobile terminal, the operator can locate an end user anytime and anywhere as permitted by the network, and provide voice and short message services. It seems that this problem can be solved successfully! But there are two mountains in front of developers. First, the monopoly capital of number resources as operators will not be easily opened up. In fact, it is not easy for Android mobile phones to bypass operators to obtain mobile phone numbers. Second, text message content interception, parsing, and matching have a high technical threshold and are increasingly subject to monitoring and restrictions of various security software. This is not a proper choice for developers.

Since this road is not easy to go, is there any other convenient choice? The answer is yes, and it is easy to implement. Let's look back. Since it is not easy for the server to find the client, but it is easy for the client to find the server, the message push process can be reversed. First, the client regularly accesses the server and establishes a connection (usually an HTTP request ). Then, the server can easily send the information to the client through this contact channel. This is the polling mode. This mode is relatively cost-effective, but it is specific to mobile terminal devices, but there is a fatal defect: high-frequency round robin leads to extremely high traffic and power consumption, low-frequency round-robin results in poor message timeliness.

The two methods have such defects. Is there any better implementation method? Indeed, Android competitors, apple, have already achieved this-persistent connection. The apple push notification service provides a persistent connection between an Apple mobile terminal and a server. Through this channel, the server can locate a mobile terminal in real time, naturally, messages can be pushed. Similarly, the push mechanism similar to Apple apns can be implemented on Android systems. Currently, mainstream implementation protocols include c2dm, XMPP, and xqtt. A detailed introduction to several mainstream persistent connection push methods on Android will be provided laterArticleIs available in succession. At the same time, some technical companies at home and abroad have taken a look at the broad market of Android information push, and have encapsulated and transformed these protocols to form a distinctive Android push solution, for example, airpush and pubnub outside China, domestic butterfly and personal push. Developers who want to quickly obtain information push capabilities on Android can also consider integrating these manufacturers' sdks.

 

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.