Things you need to know about Android push notifications

Things you need to know about Android push notifications

Some time ago, the "Unified Push Service Alliance" was established under the leadership of the Ministry of Industry and Information Technology. The alliance will unite a number of Android phone manufacturers, Internet companies and other related enterprises to create a unified push service Unified Push Service (UPS) for the Android platform, which is expected to curb various chaos in the domestic Android ecosystem.

This is exciting news for the majority of Android users in China. If everything goes well, in the near future, even low-end Android phones will be able to rely on this unified push service to get a pretty good user experience. I would like to take this opportunity to briefly introduce the history of Android push service.

Apple Push Notification Service

Before introducing Android push notifications, let's first talk about unified push notifications using Apple's push notification service. Many people choose iPhones over Android phones, and one of the main reasons is that they believe that the iOS system is smoother and does not lag after a long time of use (of course, according to recent news, iOS will reduce the performance of the phone to extend the power life of aging batteries). This smoothness is due to iOS's relatively aggressive background process restrictions, and the "Apple Push Notification Service" that has appeared since the release of iOS 3.0 in 2009 has played a pivotal role in this.


Apple Push Notification Service Push Process

On iOS, Apple Push Notification Service hosts all the notification needs of apps. When the developer (server) of an app needs to send a notification, the message will first be sent to the Apple server, and then pushed to the device via the Apple Push Notification Service. In this process, the app on the device itself is not involved. This is why we can receive push notifications from foreign apps such as Instagram and YouTube in China - after all, there are Apple servers in China, and the quality of this connection is guaranteed.

Of course, Apple later integrated this service into its own macOS, and today's macOS can also enjoy such push services. For a mobile device, such a unified push service means that applications do not need to stay in the background, and resource usage can be well controlled, so it can be smoother and more power-saving under the same configuration.

Android official push service: from C2DM to FCM

However, Android is not far behind in terms of unified push. In 2010, not long after the release of Apple Push Notification Service, Android 2.2 launched Cloud to Device Messaging (C2DM). Its principle is similar to Apple Push Notification Service. Messages are sent from the application server to the unified server and then to the device.

This service was replaced by Google Cloud Messaging (GCM) in 2012. Compared with C2DM, the main advantages of GCM are that it has no message quota limit, is more developer-friendly, and can save power better.

After Google acquired Firebase in 2014, it renamed GCM to "Firebase Cloud Messaging (FCM)" and further simplified the development of push services.


Firebase Cloud Messaging

Over the past seven or eight years, from C2DM to FCM, from Android 2.2 to Android 8.1, the unified push service has accompanied the growth of Android. Thanks to this, for foreign Android users, there is almost no lag or power consumption on their phones. On the other hand, in China, due to the unstable use of Google services in mainland China, domestic Android phones often streamline Google services for a better user experience, and the unified push service is also removed. As a result, major third-party push services came into being.

Android third-party push service

First of all, the most conscientious ones should be the push services of major mobile phone manufacturers, such as Huawei's "Huawei Push Platform" and Xiaomi's "MiPush". These push services are integrated into the highly customized Android systems of various manufacturers, enjoy system-level status, and have a higher priority for push. If all the applications in your Xiaomi phone use MiPush, I believe it can also be as smooth and power-saving as iOS.

But this is often impossible. Developers cannot take into account all manufacturers and adapt corresponding push services for each brand of mobile phone. They have done their best to take care of Huawei and Xiaomi. In addition, although the manufacturer push service can also be used normally on other brands of mobile phones, it cannot achieve system-level push like on its own system. The background process of the push service still needs to be resident.


Huawei push platform

Secondly, major Internet companies also have their own push services, such as Tencent Xinge Push, Baidu Cloud Push, and Alibaba Cloud Mobile Push. Many friends who use various Android applications from these three companies know their "Penguin Family Bucket", "Baidu Family Bucket" and "Ali Family Bucket". The "Family Bucket Effect" refers to the mutual wake-up of BAT's own applications, which makes the system become stuck and slow. When you open a Taobao, it will wake up Xianyu, Alipay, Tmall and other applications. The purpose of this mutual wake-up is to keep the shared push channel active and not be killed by the system so that messages can be delivered in time.

In addition to the two push services mentioned above, there is also a professional third-party platform that provides push services, such as Jiguang Push, Umeng Push, etc. This third-party platform is similar to the push services of major Internet companies, so applications using the same push channel will also wake up each other to keep the channel active.

Different developers will inevitably make different choices when faced with the numerous push services mentioned above, which results in a wide variety of push services used by applications on our phones. Even if we ignore the resources occupied by multiple push services themselves, the situation where applications wake up each other to keep the push channels active often causes Android phones to run at full capacity, which makes it easy to understand why the phone is slow and consumes power.

Now that the Ministry of Industry and Information Technology has stepped forward to promote unified push notifications on Android, it is undoubtedly of great significance. Once the unified push notification service becomes popular, our Android phones will become smoother and more power-efficient, and developers will no longer have to worry about configuring various push notification services and suffer user complaints. More importantly, this move will help cultivate a good domestic Android application ecosystem and promote the Android Green Application Convention to a wider range.

Using Android official push notifications in the current ecosystem

So in the current ecosystem, can we use Google's official FCM push? Of course. As long as your phone is equipped with Google services and your app is downloaded from the Play Store, you can receive push notifications through FCM even if you are in China. The picture below shows the YouTube notification I received on the domestic network.


Receive YouTube notifications on domestic networks

For some domestic applications that occupy a large amount of system resources, I suggest you use "Black Domain" to limit their background activities and turn on "Allow Sync" to receive push notifications (only some applications are supported). Take WeChat as an example. It shows that it supports FCM in Black Domain, so after we "black domain" WeChat in Black Domain and turn on sync, even if the WeChat application is in Standby (applications with sync turned on will not be forcibly stopped in Black Domain), we can receive push notifications through FCM in a timely manner.


Enable "Allow Sync" in WeChat in Black Domain

Of course, due to the deployment problem of Google servers, FCM is still not stable in China. I hope that the unified push service led by the Ministry of Industry and Information Technology can be launched as soon as possible, so that Android users can get rid of the dilemma of running out of battery after using their phones for half a day.

<<:  How to replace the official iPhone battery for 218 yuan? Here is a complete and practical guide

>>:  Five of the best apps to control your PC from your Android smartphone

Recommend

Three lies about smartphones

If we count from 1965 when Moore's Law emerge...

What should I do if my Tik Tok works are not recommended?

After the emergence of Kuaishou short video, shor...

What is the upper limit of human height?

From ancient times to the present, height has alw...

"Swordsman" movie series three collections HD

The secret martial arts manual "Sunflower Ma...

Remix 0S experience: See how Android revolutionizes Windows

It is not a new thing to move the x86 architectur...

Stanford: 2018 Artificial Intelligence Index Report

The AI ​​Index, initiated by Stanford University,...

3 steps to effectively improve the user retention rate of your product!

After entering the stock market, user value becom...

Let’s go! Go to the southernmost tip of the earth to “get seawater”

Antarctica, a sparsely populated icy continent, i...

Is your language betraying your character?

How can language reflect people's character? ...

Understand the HAL hardware abstraction layer in the Android system architecture

Introduction to HAL HAL refers to the Hardware Ab...

A brief discussion on the rules of Kuaishou live streaming

Amid the epidemic, offline stores are bound to be...

App promotion: Is winter coming? How to promote products at low cost!

First of all, what I want to tell you is that in ...

How to create an app with tens of millions of users?

In the era of "users are king", owning a...

“Soul” product operation analysis!

Social needs are the third need based on physiolo...