How can i do a notification in the status bar without the expanded message in the "Notifications" window? (only want the icon)
How can i do a notification in the status bar but without the expanded message in the "Notifications" wi开发者_如何学运维ndow?
i mean, i need just the icon, nothing more
there is a way to do that?
Quoting the documentation:
A status bar notification requires all of the following:
- An icon for the status bar
- A title and expanded message for the expanded view (unless you define a custom expanded view)
- A PendingIntent, to be fired when the notification is selected
Hence, you will need to have an entry in the notification drawer. Among other reasons, this is so the user has some idea what the heck your icon is there for. Remember that the goal of Android development is to make users happy. Having unexplained icons in the status bar will not make the users happy.
精彩评论