How to ensure that messages are pushed to the Android

Source: Internet
Author: User

In general, you can listen to a number of frequently occurring messages, such as power changes, switching screens, network switching, and so on, registering broadcastreceiver to receive messages and receiving a service that initiates a push message.

Now some manufacturers of ROM, once the user actively kill the process, then no longer deliver broadcast messages to the application, resulting in the application will not start, in this case, you can use C fork out a process, check whether the main process is killed, once killed, immediately call the shell command to start the service, This is a bit more rogue, but some applications, such as IM, are improving the user experience.

Some vendors, such as Huawei, have been killed in the process of killing, along with the process of fork-out. There are two ways to do this: 1. Prompts the user to add the app to the whitelist of the vendor cleanup program such as "Protected apps", "Clean back". 2. Use the push interface provided by the manufacturer.

How to ensure that messages are pushed to the Android

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.