Android notifications: how to send setSmallIcon using custom Bitmap

I want to post a notification with a short text index of the icon. I plan on doing this by making my own draw in this bitmap. The problem is that setSmallIcon requires a resId (I don't want to create a lot of predefined bitmaps!), But the setLargeIcon value is ignored anyway in the notification bar and only shows up when all notifications are open.

Can anyone advise on a trick? How can I use bitmaps there?

+3


source to share


1 answer


I do not think that's possible. The API allows a small notification icon to be set using a resource, and I assume this was intentional.

You can use the big icon on Android v3.0 + for which you can use Bitmap, but it is usually meant to show people / contacts, so be careful what you show there.



I suspect a better option would be to use a custom notification - at least you have some flexibility as to what you can display http://www.roman10.net/android-custom-notification-with-progress-bar/

0


source







All Articles