I wanted to create a notification without the icon in the status bar (the state that is not expanded). I tried the custom expanded view and set the icon for this view only. But it did not work. When I give 0 as icon to the constructor, the icon disappears but notification also does not appear in the expanded view.
Notification notification = new Notification(0, “”, 0);
I tried a lot of combinations but didn’t come out with a solution. By the way, I know it is working because I saw this feature in some apps. Thanks.
QuickSettings did this and as I looked at that code I saw it uses the default constructor of Notification and pushes its icon to the right of the notification bar. I think it still uses space but has no icon.
Some code:
edit: oh sorry I missed an important line of code, in fact he uses a placeholder. But now you have some code 😉
http://code.google.com/p/quick-settings/source/browse/trunk/quick-settings/src/com/bwx/bequick/receivers/StatusBarIntegrationReceiver.java