在我的测试代码中,我使用
notification.flags |= Notification.DEFAULT_SOUND;
notification.flags |= Notification.DEFAULT_LIGHTS;这不起作用,根据我在another question上得到的答案,我将.flags改为.defaults,它起作用了。
notification.defaults |= Notification.DEFAULT_SOUND;
notification.defaults |= Notification.DEFAULT_LIGHTS;在documentation中,两个字段:标志和默认值是相同的。
我什么时候使用哪一个?我可以设置两个相同家族的旗帜吗?
发布于 2011-07-08 04:32:37
系统必须检查这些字段中是否有不同的内容。它检查" defaults“以查看您想要将哪些特性作为它们的默认值,并在”flag“中查找一些其他标志。所有这些都在Dev Guide中进行了解释
https://stackoverflow.com/questions/6616549
复制相似问题