background

Since I started to use the iPhone, when I received wechat or other notifications, THERE was always a phenomenon — obviously there was a new message notification in the notification bar, but after I clicked the App to wake up, the head part always displayed the connection, and the specific message could not be displayed for a long time. Very angry at that time! I thought: What the hell is this? Android all used mobile phones Samsung, Huawei, OnePlus do not have this problem, should not be my mountain pig can not be used to eat the bran 🤔, and then the heart began to greet Apple (I believe many people and I have the same idea 🐶). It wasn’t until a couple of weeks ago when I was talking to my brother about this that I realized that there was some sort of cause and effect to it that it might not be as simple as it looks. As a result, I looked up some relevant information, carefully pondered and thought about it, and then EXPLAINED some of the principles.

Introduction to the

To put it simply, the notification push mechanism of Android and IOS is completely different. Of course, the essence of both systems is to establish a long connection to complete the upward and downward transmission of messages

ios

Wechat messages in ios use a complete set of message Push mechanism, that is, wechat server messages are sent to The Apple Push Notification Service (APNS), APNS will notify the corresponding device through device token and AppID, etc. Then the iPhone is displayed in the notification bar. When we click the notification bar to evoke the APP, the link appears, which is the waiting time of our iPhone pulling the message from APNS. In this case, all it takes is a long connection between the phone and the server to push all the messages.

android

The original Android ecosystem mechanism also has push server such a thing, Google’S FCM (Firebase Cloud Messaging), but was emascuated in China. Then the major domestic manufacturers have their own Push server, Huawei, Xiaomi, Vivo, OpPO, including Tencent’s TPNS (carrier pigeon), Alibaba Cloud Mobile Push (Push), the problem comes, not unified chaos ah, each playing their own standards, that APP manufacturers are reluctant to accept ah. Finished I think a few years ago, the Ministry of Industry and Information Technology organized the Android unified push alliance, has been forgotten in the corner… WeChat message in android use is the most simple C/S architecture (the actual affirmation complicated), in the above, namely WeChat server and app communication directly, this is, of course, fast, middle to omit the process, but each have a app need nudges are needed to establish a long connection, need to app resides in the background, also means that the extreme consumption of memory. That’s why android phones tend to have more memory than iphones, and they’re prone to memory fragmentation, which makes Android more sluggish over time, and that’s the cost of this architecture.

I have also confirmed with my teacher that for the businesses related to push in app, ios is connected to API of Apple APNS, while Android is connected to API push of HuamiOV by large manufacturers, while small mobile phone manufacturers directly use self-developed connection to complete push (the efficiency will be lower).

conclusion

From a single App user experience perspective, Android’s approach is superior, which is why Apple is criticized; However, from the long-term perspective of technology and mobile phone service life, ios is reasonable. But because of Apple’s ecological closed-loop and persistence, bad money will not drive out good money, right? Of course, most people change their phones every two or three years now, so it’s not a good reason to upgrade after a few years

Finally, there is an interesting thing. According to statistics, iPhone users grab wechat red packets but Android users do not (most likely because of the different push mechanism).