What is the difference between: notification.flags and notification.defaults?

In my test code, I used

notification.flags |= Notification.DEFAULT_SOUND; notification.flags |= Notification.DEFAULT_LIGHTS; 

This did not work, and according to the answer I got another question , I changed the flags to .defaults, and it works.

  notification.defaults |= Notification.DEFAULT_SOUND; notification.defaults |= Notification.DEFAULT_LIGHTS; 

In the documentation, both fields: flags and default values ​​are the same.

When will I use which one? Can I set 2 flags of the same family?

+4
source share
1 answer

The system must check these fields for different things. It checks the “defaults” to see which features you want to use by default, and find some flags in the “checkboxes”. All of this is explained in the Dev Guide.

+5
source

All Articles