android - service可以像静态broadcastReceiver一样,即使APP已经退出,仍然在后台运行吗?
怪我咯
怪我咯 2017-04-17 17:25:17
0
5
675

service可以像静态broadcastReceiver一样,即使APP已经退出,仍然在后台运行吗?

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(5)
左手右手慢动作

In fact, even static broadcastReceivers can be killed. At present, domestic mobile phones attach great importance to background services. Like Huawei mobile phones, third-party services will be killed when the screen is turned off, except for joining the whitelist of Huawei Butler. Apps such as QQ and WeChat are whitelisted by default. Answer the original poster’s question below:

Using remote service can make the app exit the service and still run in the background, but it can be easily killed by some housekeeping software. Therefore, you can increase the priority of the service by setting the service as a foreground service, which can reduce the probability of being killed.

The killer tip: Change the package name of your app to com.tencent.mm, guaranteed not to die, haha.

洪涛

This is not possible

伊谢尔伦

Look at the introduction of the service on google, it is impossible for domestic mobile phones, the native system will stop when there is not enough memory

迷茫

You can search for articles about process keep-alive
Android service background keep-alive principles and test results

洪涛

Don’t QQ have this function? Although I have turned it off, the background service can still receive friend information

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template