通过代码访问 Android 4.3 中的新通知设置 [英] Accessing the new Notification Settings in Android 4.3 through Code

查看:19
本文介绍了通过代码访问 Android 4.3 中的新通知设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何通过代码访问它?所以我可以自动为用户打开它,他们不必通过安全设置来启用它.

How can I access this through code? So I can open it for the users automatically and they don't have to hunt through the Security settings to enable it.

我无法在 Android Studio 中使用 startActivity(new Intent(Settings.<>)); 找到它,其中 <> 是设置屏幕列表.

I am unable to find it in Android Studio using startActivity(new Intent(Settings.<>));, where <> is the list of setting screens.

图片由 Android Police 提供

Image courtesy of Android Police

推荐答案

有一个一个突出的错误 在 Android 4.3 中,Settings 中未列出通知侦听器屏幕操作.目前的解决方法是:

There is an outstanding bug in Android 4.3 where the notification listener screen action is not listed in Settings. The current workaround is:

startActivity(new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS"));

这篇关于通过代码访问 Android 4.3 中的新通知设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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