Fixed
Status Update
Comments
ha...@android.com <ha...@android.com>
he...@gmail.com <he...@gmail.com> #2
One other quirk of this is the string "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS" has ACTION_ in it whereas none of the other settings actions do. i.e., "android.settings.APN_SETTINGS" for ACTION_APN_SETTINGS.
It looks like the hidden constant ACTION_NOTIFICATION_LISTENER_SETTINGS is defined properly but the manifest for settings has the "ACTION_" prepended to it.
Also, I think it would be helpful to explain somewhere in the NotificationListenerService docs that using this to get the users permission is necessary.
It looks like the hidden constant ACTION_NOTIFICATION_LISTENER_SETTINGS is defined properly but the manifest for settings has the "ACTION_" prepended to it.
Also, I think it would be helpful to explain somewhere in the NotificationListenerService docs that using this to get the users permission is necessary.
ds...@google.com <ds...@google.com> #3
Thanks for the feedback, we'll clean those up in a future release.
cw...@android.com <cw...@android.com> #4
Sorry we dropped this. I have now submitted a patch that unhides the constant and fixes the inconsistency between the value and the manifest.
I changed the constant value to include the "ACTION_" so that it matches what the Settings app expects, since people will have already copied out that version of the string into their code to get things working, and I'd rather not break them.
Some of the other constants don't include the "ACTION_" in the value, but some do: see ACTION_PRINT_SETTINGS for example.
I changed the constant value to include the "ACTION_" so that it matches what the Settings app expects, since people will have already copied out that version of the string into their code to get things working, and I'd rather not break them.
Some of the other constants don't include the "ACTION_" in the value, but some do: see ACTION_PRINT_SETTINGS for example.
da...@gmail.com <da...@gmail.com> #5
Still not released and marked to be released since Oct 2014.
pa...@gmail.com <pa...@gmail.com> #6
i have one problem in getting current statusbar notification information.
i can't getting current notification information so plz help any one
i can't getting current notification information so plz help any one
sm...@gmail.com <sm...@gmail.com> #7
The support library provides a workaround via NotificationManagerCompat.getEnabledListenerPackages(Context). The framework should provide this API.
sm...@gmail.com <sm...@gmail.com> #8
Oops, I take back my above comment. NotificationManager.isNotificationPolicyAccessGranted() does exist on 23+.
sm...@gmail.com <sm...@gmail.com> #9
Nope, I was right the first time. Sorry!
isNotificationPolicyAccessGranted is an unrelated API.
NotificationManagerCompat.getEnabledListenerPackages(Context) remains the only API, outside of copying its hack into my own maintained code.
It seems like NotificationManagerCompat.getEnabledListenerPackages(context).contains(context.getPackageName) would be a common enough use case to merit a platform API for that operation.
isNotificationPolicyAccessGranted is an unrelated API.
NotificationManagerCompat.getEnabledListenerPackages(Context) remains the only API, outside of copying its hack into my own maintained code.
It seems like NotificationManagerCompat.getEnabledListenerPackages(context).contains(context.getPackageName) would be a common enough use case to merit a platform API for that operation.
Description
NOTIFICATION_LISTENER_SETTINGS is listed as @hide and therefore isn't available to the SDK.
As a workaround one can start an intent using the string:
startActivity(new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS"));