即使从MI Phone的任务管理器中关闭了应用程序,如何保持我的应用程序服务保持运行

编程入门 行业动态 更新时间:2024-10-22 17:23:59
本文介绍了即使从MI Phone的任务管理器中关闭了应用程序,如何保持我的应用程序服务保持运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的应用程序具有后台服务,即使应用程序从任务管理器中被杀死,该后台服务仍可继续运行,但是当我在MI(小米)手机上测试了我的应用程序时,当我从任务管理器和服务中关闭该应用程序时,它会终止我的应用程序服务即使我从任务管理器中杀死了我的应用程序,仍然可以在MI以外的所有设备上继续运行并完美运行.

My app has background service which keep on running even if app is killed from the task manager but when I have tested my app on MI(xiaomi) phone it kills my app service when I close the app from task manager and my service keep on running and work perfectly on all devices except MI even if I kill my app from task manager.

那么,即使应用程序从任务管理器中被杀死,如何使我的服务在后台运行呢?

So how to keep my service running in background even when the app is killed from the task manager?

推荐答案

MIUI具有内置的安全性"应用程序.在安全性"应用程序中,有一个自动启动"部分,用户可以在其中配置哪个应用程序在启动时可以运行,以及哪个应用程序不能在启动时运行.您的应用程序默认为禁用.您需要启用您的应用程序,还需要从权限部分启用权限管理器.

MIUI has a built-in Security app. In the Security app there is a 'Autostart' section, where the user can configure which app can and which app can't run on startup. Your application is disabled default. You need to enable your app and also enable permission manager from permission section.

更多推荐

即使从MI Phone的任务管理器中关闭了应用程序,如何保持我的应用程序服务保持运行

本文发布于:2023-11-27 08:29:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1637290.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   任务管理器   关闭了   MI   Phone

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!