关闭一个应用程序的编程通知在Android应用程序、通知、Android

2023-09-05 23:34:29 作者:挽梦

我开发的软件包管理器应用程序,它显示复选框以关闭通知,从安装在Android设备上的不同应用。

I am developing a package manager application which shows checkboxes to turn off notifications from different applications installed on the Android device.

由于Android 4.1,用户可以关闭从应用程序管理器的应用程序的通知。我可以开启/关闭通知从一个应用程序编程?是否有一个API,这样做?

Since Android 4.1, users can turn off notifications of an app from application manager. Can I turn on/off notifications from an app programatically? Is there an API for doing that?

推荐答案

没有,你不能做到这一点,从您的code。也许对root权限的设备,你可以做一些魔术,但不得真的算的更广泛的观众。

No, you cannot do that from your code. Perhaps on rooted devices you could do some magic, but that shall not really count for wider audience.