如何停止系统服务? [英] How to stop a system service?

查看:109
本文介绍了如何停止系统服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何在Android中使用我的应用程序停止系统服务,这里我不是在谈论停止应用程序内存在的服务类,我是在考虑停止系统服务,例如(蓝牙邮件警报 WiFi ,..... etc),我试图使其类似于以下内容,但一无所获已停止:

I want to know how to stop a system service using my app in android, I'm not talking here about stopping a Service Class that exists inside my app, I'm taking about stopping a System Service like (Bluetooth, Mailing, Alarm, WiFi, .....etc) I tried to make it like the following but nothing stopped:

    stopService(new Intent(Service.BLUETOOTH_SERVICE));

推荐答案

我想知道如何在Android中使用我的应用程序停止系统服务,

I want to know how to stop a system service using my app in android,

在应用的用户界面中,您要求用户完全关闭手机电源.如果您的应用是系统应用(例如安装在/system分区上,例如预安装的应用),则可以自行关闭设备的电源.

In the UI of your app, you ask the user to completely power down their phone. If your app is a system app (i.e., installed on the /system partition, such as a pre-installed app), you may be able to power down the device yourself.

开发人员认为系统服务"仅仅是核心OS流程的API. SDK开发人员无法控制这些过程.

What developers perceive as a "system service" is merely an API to a core OS process. SDK developers do not have control over those processes.

这篇关于如何停止系统服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆