如何从打开所有停止某些应用程序?应用程序

2023-09-12 06:09:53 作者:怎么吃不饱

随着用户的权限,我希望能够停止从开盘在一天的某些时间某些应用程序。

With User's permission, I want to be able to stop certain apps from opening at certain times of the day.

我想要做的是 - 当用户点击应用程序图标,应用程序不打开 - 它只是显示了一个面包的消息。

What I want to do is - when user clicks on an app icon, the app does not open - it just shows you a "Toast" message.

可以这样做?

我已经在网上进行搜索,并不能找到一种方法来做到这一点,甚至假冒的影响。

I have researched online and cannot find a way to either do this or even fake the effect.

推荐答案

要真正停止的应用程序的发动需要您的应用程序可以通过相同的证书作为操作系统(从制造商)签署,或以root身份运行(上植根设备)。三星提供了三星安全程序(我认为外管局的)中,你支付他们签署您的应用程序,并使用他们的API来这种事情。

To actually stop the apps from launching would require your application to be signed by the same cert as the os (from the manufacturer), or to be run as root (on rooted devices). Samsung offers a program for Samsung SAFE (I believe SAFE is the one) in which you pay them to sign your application, and use their APIs for this kind of thing.

一个方法来打假这种影响将是运行的手表前台应用程序后台服务,如果它被列入黑名单(不允许),然后将其关闭。这就提出了其他问题,如时间,仍然允许任务在后台启动。

A way to "fake" this effect would be to run a background service which watches the foreground application, and if it is blacklisted (not allowed) then close it. This poses other issues such as timing, and still allowing tasks to start in the background.

因此​​,在短期;不,这不可能做到,除非你有硬件厂商的合作。你也可以假的,但它不会是非常可靠的。

So in short; No, this cannot be done unless you have a partnership with hardware vendors. And you can "fake" it but it won't be very reliable.