Android keep alive from getting started to giving up: guide users to add white list (attached with examples of 7 major models)

Time:2020-10-27

1. Introduction

The problem of IM keeping alive on Android is often discussed in forums and technology groups of instant messaging networks. Since Android 8.0, the system has greatly reduced the survivability tolerance of background running applications (see “Android” for details) The official version of P is coming: the real nightmare of back-end application and message push). Baohuo has entered the stage of technology wilderness from the era of black technology. It is more and more difficult for baohuo to be realized.

Android keep alive from getting started to giving up: guide users to add white list (attached with examples of 7 major models)

But then again, since using black technology to keep alive is the reverse trend of Andriod’s technology, why not turn around and become a “good citizen”?

This article will take an online im product as an example to introduce how it guides users to add whitelists on several mainstream models, and shares the detailed white FAQ page resources (including complete HTML + images) of up to 7 mainstream Android models that have been produced in this IM, so as to facilitate your reference, study and research, and hope to bring help for your application development.

Special notice: the resources in this example come from a real im product, only for study and research, do not use it for illegal purposes, if there is infringement, please let me know.

exchange of learning:

-5 groups of instant messaging / push technology development and exchange: 215477170 [recommended]
-Introduction to mobile IM development article: a novice is enough: developing mobile IM from scratch

This article has been released in official account of the “instant messaging technology circle”.

Android keep alive from getting started to giving up: guide users to add white list (attached with examples of 7 major models)

The link on the official account is: https://mp.weixin.qq.com/s/JqWloZLBYicpxElVL_ Hkyw, the original link is: http://www.52im.net/thread-3033-1-1.html

2. Keeping Android alive is becoming more and more impossible

IM products on Android live problem from the early system version to now, no one has stopped trying. With the upgrade of Android system version, the instant messaging network has continued to sort out a lot of related articles, such as the following (the order of articles is from low to high according to the version of Android system).

  • “The ultimate summary of application to keep alive (1): the practice of dual process Guardian keeping alive under Android 6.0”
  • “The ultimate summary of application of keeping alive (2): keeping alive practice of Android 6.0 and above (process anti killing chapter)”
  • “The ultimate summary of application of living preservation (3): living practice of Android 6.0 and above (killed and resurrected)”
  • How to keep Android process alive: an article to solve all your questions
  • The official version of Android P is coming: the real nightmare of live background application and message push
  • A comprehensive review of the real operation effect of current Android background alive scheme (by 2019)
  • “The ultimate summary of application to keep alive (1): the practice of dual process Guardian keeping alive under Android 6.0”
  • “The ultimate summary of application of keeping alive (2): keeping alive practice of Android 6.0 and above (process anti killing chapter)”
  • “The ultimate summary of application of living preservation (3): living practice of Android 6.0 and above (killed and resurrected)”
  • How to keep Android process alive: an article to solve all your questions
  • The official version of Android P is coming: the real nightmare of live background application and message push
  • A comprehensive review of the real operation effect of current Android background alive scheme (by 2019)

From the above articles, we can see that since Android 8.0 (i.e. Android P), Im and other products that need to be kept alive in the background have become more and more difficult to survive, and black technology almost doesn’t work.

As a result, some technologies can only try to break through the system’s survivability limitation from the deeper level of Android system. For example, the two articles: “the strongest Android alive thinking in history: in-depth analysis of Tencent Tim’s process immortality technology”, “the ultimate disclosure of Android process immortality Technology: the underlying principle of process being killed, APP coping with being killed skills”.

As in the above two articles, in order to fight against the system, it can be described as a battle of wits and courage. However, no one can stop the historical process of Android system. It is the consensus of Android official and major mobile phone manufacturers that more and more strict restrictions on keeping alive.

Well, all kinds of black technology that used to be so laborious, now it’s like a cloud…

Android keep alive from getting started to giving up: guide users to add white list (attached with examples of 7 major models)

3. Die hard to keep alive? Don’t dream. Come back

As mentioned in the previous section, in view of the fact that Android is becoming more and more impossible, many products that originally rely on black technology to keep alive have begun to re-examine the implementation of baohuo technology. Are they going to take baohuo black technology to black or return to the official best practice of Android (guide users to manually set the white list)?

I personally think that the latter is the inevitable result of the development of baohuo technology, just like the attempt made in the previous article: “in 2020, is there any drama for Android background baohuo? See how I achieve it gracefully! 》To guide users to “add white”.

Giving up the “black technology” does not mean that the technology is not good and returning to the “good people”, but it will become relaxed.

Android keep alive from getting started to giving up: guide users to add white list (attached with examples of 7 major models)

4. Calling system code to guide users to add whitelist is not perfect

Before finishing the “2020, Android backstage guarantee live still play? See how I achieve it gracefully! According to different models, it automatically adaptable the code and invoked the white list setting function in the code.

For example, code calls like the following:

Android keep alive from getting started to giving up: guide users to add white list (attached with examples of 7 major models)

(?) the following code is quoted from “2020, is there any play for Android background protection?”? See how I achieve it gracefully!

A window will pop up:

Android keep alive from getting started to giving up: guide users to add white list (attached with examples of 7 major models)

This method is really good, but because of different models and different room versions of the same model, the compatible processing of code may be quite complicated. Although the method is good, it can not solve all problems once and for all.

5. It is a supplementary method to provide FAQ help for more models in the application

As shown in the previous section, calling system code to guide users to add whitelists is indeed “elegant”. However, there may be great differences between different models and different system versions of the same model. Code compatibility is a headache. In short, this is not a perfect solution.

This requires a supplementary means. For example, we can provide users with help in the form of FAQ help pages for a large number of different models and for their most popular or most common system versions.

For example, you can open a FAQ page like this in your mobile phone:

Android keep alive from getting started to giving up: guide users to add white list (attached with examples of 7 major models)

At least in the case that the calling system code cannot be implemented, the user can find a solution to the problem independently. This is what this article wants to share. The next section will take a better IM application on the market as an example to provide you with a complete example.

6. A complete “white” FAQ help example

Recently discovered an IM application on the market (this product has nothing to do with instant messaging network, just as a reference for technical research), and its built-in “white” FAQ help is very perfect.

Here is a cut-out of the im: 

Android keep alive from getting started to giving up: guide users to add white list (attached with examples of 7 major models)

The following is the demo video of this IM application (click here to open the video link)

At present, the FAQ help in the application has covered seven mainstream Android machines. The following is a link to the complete sample page:

  • 1) How to solve ASUS mobile phone can not receive the message reminder? (check in the mobile phone, the effect is better)
  • 2) How to solve the problem that HTC mobile phone can’t receive message reminder? (check in the mobile phone, the effect is better)
  • 3) How to solve the problem that Huawei mobile phone can’t receive message reminder? (check in the mobile phone, the effect is better)
  • 4) How to solve the problem that Xiaomi mobile phone can’t receive message reminder? (check in the mobile phone, the effect is better)
  • 5) How to solve the problem that oppo mobile phone can’t receive message reminder? (check in the mobile phone, the effect is better)
  • 6) How to solve the problem that Samsung mobile phone can’t receive message reminder? (check in the mobile phone, the effect is better)
  • 7) How to solve the problem that vivo mobile phone can’t receive message reminder? (check in the mobile phone, the effect is better)

As you can see, this IM’s “white” FAQ is still relatively detailed and covers a typical model. If you have similar ideas or requirements, you can refer to the implementation of this product. Especially in some specific scenarios (such as internal IM, etc.), this method can still solve the problems of most end users.

7. Static resources of FAQ page with “white” covering 7 mainstream models (attachment download)

I have sorted out all the “white” FAQ help page resources of this im product mentioned in the previous section, covering seven mainstream Android models. If you need the same thing, you can refer to this complete sample implementation and package it into your mobile phone.

The following is the content of this static resource example (the figure is too long and has been truncated)

Android keep alive from getting started to giving up: guide users to add white list (attached with examples of 7 major models)

The following is a packaged attachment to this static resource example:

Please download from the attachment: http://www.52im.net/thread-3033-1-1.html

Appendix: summary of more excellent resources

[1] Source code download:
“Java NiO basic video tutorial, Mina video tutorial, netty quick start video [with source code]”
IOS source code of mobile IM SDK (open source version) [attachment Download]
Open source im project “mushroom street teamtalk” complete code without deletion before May 2015 [download attached]
“Cracked version of wechat local database (including IOS and Android), for learning and research only [download attachment]”
Introduction to NiO framework (4): cross platform UDP two-way communication between Android and mina2 and netty4 [download attachment]
Introduction to NiO framework (3): cross platform UDP two-way communication between IOS and mina2 and netty4 [download attachment]
Introduction to NiO framework (2): demo demonstration of UDP two way communication based on mina2 on server side [download attachment]
Introduction to NiO framework (1): demo demo of UDP two way communication based on netty4 on server side [download attachment]
“Android tool source code for image compression in IM, the effect is comparable to wechat [download attachment]”
High imitation Android mobile phone QQ drag unread small bubble source code [download attachment]
A websocket real time chat room Demo: Based on node.js + socket.io [attachment Download]
Android chat interface source code: realize chat bubble, Emoticon (page turning) [attachment Download]
High imitation Android version mobile phone QQ homepage sideslip menu source code [download attachment]
Open source libco Library: the cornerstone of the background framework [source code download] for 10 million single machine connections and supporting 800 million wechat users
Share Java AMR audio files, merge source code, the most complete in the whole network
“Wechat team’s original Android resource obfuscation tool: andresguard [with source code]”
A complete Android push demo based on mqtt communication protocol
Android version of high imitation wechat chat interface source code [download attachment]
Android version lock screen chat message reminder function of high imitation mobile phone QQ [attachment Download]
Full version of “QQ” and “high amplitude animation”
“Comment and reply function in Android social application actual sharing [image and text + source code]”
“Realization of @ person function in Android side IM application: imitating microblog, QQ, wechat, zero invasion and high scalability [text and text + source code]”
IM chat time display format based on wechat (including IOS / Android / Web Implementation) [text + source code]
“Android version of wechat friends circle image drag return effect [source code download]”
[2] Excellent documents and tools download:
Computer network communication protocol diagram (Chinese version) [attachment Download]
Brief history of the most complete instant messaging software in history
Heavy release: Alibaba Android Development Manual (Protocol) [download attachment]
Alibaba technology crystallization: Alibaba Java Development Manual (specification) – final version [download attachment]
Principle and application of streaming media technology based on RTMP protocol (Technical Paper) [attachment Download]
“Exclusive release of TCP / IP detailed explanation Volume 1: Protocol” CHM version [attachment Download] “
Conscience sharing: webrtc zero foundation developer tutorial (Chinese) [attachment Download]
Mqtt protocol manual (Chinese translation version) [attachment Download]
The most complete download of classic book unix network programming (Volume 1 + Volume 2, Chinese version + English version) [attachment Download]
Video technical manual (5th Edition) [attachment Download]
Official technical manual of ITU H.264 video coding standard (Chinese version) [attachment Download]
Apache mina2.0 Development Guide (Chinese version) [attachment Download]
Using Wireshark, a network communication data capture and analysis tool (Chinese) [download the attachment]
Latest collection of free stun server list for NAT traversal (P2P drilling) [attachment Download]
Classic of high performance network programming: the C10K problem
Principle, technology and application of instant messaging system (Technical Paper) [download of attachment]
Technical paper: technical test and analysis of wechat’s impact on network [download attachment]
Huawei’s internal 3G network information: WCDMA system principle training manual [attachment Download]
Network testing: enterprise Ping for Android
Android decompiler apkdb: how to be strong without artists
A NAT type detection tool for P2P development [download attachment]
Two enhanced Ping tools: continuous statistics and graphical exhibition network status [attachment Download]
“Android keeps alive from entry to give up: guide users to add white list (attached with examples of 7 major models)”
[3] PPT download of selected videos and speeches:
PPT for massive users of MTU
Architecture explanation and practice summary of webrtc (PPT + video) [attachment Download]
“QQ space 10 billion level traffic social advertising system architecture practice (Video + PPT) [attachment Download]”
“Evolution of live video system architecture for massive real-time messages (Video + PPT) [attachment Download]”
“YY live broadcast in the mobile weak network environment in depth optimization practice sharing (Video + PPT) [download attachments]”
“QQ space mobile terminal 1 billion video playback technology optimization (Video + PPT) [attachment Download]”
“RTC real time Internet 2017 annual conference selected speech ppt [attachment Download]”
“Wechat sharing open source IM network layer component library Mars (Video + PPT) [attachment Download]”
Practice of micro service concept in the background architecture of wechat massive users (Video + PPT) [attachment Download]
Practice sharing of technical difficulties in mobile IM development and construction (Video + PPT) [attachment Download]
“Netease cloud letter’s high quality instant messaging technology practice Road (Video + PPT) [attachment Download]”
Tencent audio and video laboratory: facing the pain of audio and video quality assessment (Video + PPT) [attachment Download]
Technical challenges and architecture evolution path of Tencent QQ 140 million online users
“Wechat circle of friends mass technology PPT [attachment Download]”
Architecture and practice of mobile Taobao message push system (audio + PPT) [attachment Download]
How to evaluate and monitor the quality of real-time audio and video (Video + PPT) [attachment Download]
PPT for building high concurrency message push system with go language (from 360 company) [attachment Download]
“Architecture design and practice of Netease im cloud 10 million level concurrent message processing capability ppt [attachment Download]”
Mobile practice sharing of mobile QQ users (Video + PPT) [attachment Download]
Nailing: technical challenges of new generation enterprise OA platform based on IM technology (Video + PPT) [attachment Download]
“Wechat technical director talks about the structure: the way of wechat — daozhijian (PPT lecture notes) [download the attachment]”
Architecture analysis and application case introduction of netty (Video + PPT) [attachment Download]
Voice network architects talk about the difficulties of real-time audio and video cloud implementation (video interview)
Didi taxi architecture evolution and Application Practice (PPT lecture notes) [attachment Download]
Background system storage architecture behind massive wechat users (Video + PPT) [attachment Download]
Best practices for server architecture of online audio and video studio (Video + PPT) [download attachments]
“From 0 to 1: practice sharing of live audio and video technology for 10000 people online (Video + PPT) [attachment Download]”
“Exploration and practice of wechat mobile terminal in response to weak network situation ppt [attachment Download]”
Technology evolution of Android wechat from 300KB to 30MB (PPT lecture notes) [attachment Download]
“Building melon seeds used car IM system (PPT) from scratch [attachment Download]”
Aurora sharing: architecture evolution of high concurrency mass message push system (Video + PPT) [attachment Download]
Usability design practice of wechat red packet system (PPT) [attachment Download]
Evolution of wechat red packet data architecture (PPT) [attachment Download]
“Baidu network disk 10 million nodes P2P architecture design (PPT) [download attachments]”
Data architecture design (PPT) of melon seed im intelligent customer service system [attachment Download]
Building cross platform development framework (PPT) for wechat client based on C + +

(this article was published at: http://www.52im.net/thread-3033-1-1.html )