禁用"强制停止"巴顿在Android中 [英] Disabling "Force Stop" Button in Android

查看:176
本文介绍了禁用"强制停止"巴顿在Android中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我是pretty的肯定,这是不可能的,但一个客户问我这样做,我们的开发,我们对她的Andr​​oid应用程序之一。

Okay, I'm pretty sure that this is not possible but a client had asked me to do so in one of our Android application we developed for her.

她所想的是,如果我们的应用程序正在运行,并且用户浏览到:

What she had wanted is that if our application is running, and user navigate to:

 Settings > Manage Application > [Our Application]

,对强制停机按钮将被禁用。

, the button for "Force Stop" is disabled.

这可能吗?如果可能的话,可能有人点我了,我应该走哪个方向,或者如果它是不可能的,怎么样,使用基于事实的一个有效参数,我应该打破这个消息告诉了她。

Is this possible? If it is possible, could someone point me out which way I should walk, or if it is not possible, how, using a valid argument based on facts, should I break the news to her.

更新: 她只是给我发的截图,在她的意见,她的验证请求有一个Android应用程序,禁用强制停止按钮。我怎么解释这样对她?

Update: She just sent me a screenshot that, in her opinion, validates her request that there's an Android application that disables "Force Stop" button. How am I supposed to explain this to her?

推荐答案

这是无法远程可能的,伟大的理由。

This is not remotely possible, for great reason.

您应该告诉她,使这可能会是一个巨大的安全灾难。想象一下会发生什么,如果你可以创建一个刚吃了你的处理器时间由持有唤醒锁的应用程序,你不能杀了他们。这将是可怕的。

You should tell her that making this possible would be a huge security disaster. Imagine what would happen if you could create apps which just ate at your processor time by holding a wake lock, and you couldn't kill them. This would be horrible.

在一般情况下,如果你想知道,如果你可以修改设备的额外的应用程序的行为,得到的回答是的一般的*不*。你应该采取的观点,没有什么设备上是除了你的应用程序你的控制和(在有限的范围内)的资源,您是授​​予访问权限。

In general, if you're wondering if you can modify the "extra-app" behavior of the device, the answer is usually *no*. You should take the viewpoint that nothing on the device is yours to control besides your app and (to a limited extent) the resources to which you're granted access.

没有其他的应用程序有这种控制,所以它不是合理的期望,你的客户的要么。然而,事实上,她的要求这种控制通常意味着别的东西:他们担心用户会停止该应用程序,然后坏事就会发生(的位置将不再是同步的,数据将停止发送到网等...)。这意味着,你应该考虑提高应用程序在不同的情况下的应变能力。记住,你的应用程序甚至可以杀死了在任何时候的Andr​​oid(例如,在内存不足的情况​​下)。

No other app has this kind of control, so it's not reasonable to expect that your client's would either. However, the fact that she's asking for this control usually implies something else: that they are worried the user will stop the app and then something bad will happen (the locations will stop being synced, data will stop being sent out to the net, etc...). This would imply that you should look into improving the resilience of the app to different situations. Remember, your app can even be killed off at any time by Android (for example, in the case of low memory).

这篇关于禁用"强制停止"巴顿在Android中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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