Is there a support library for Icon.CreateWithBitmap(bm)
where you can use it below API 23?
Or something that can is compatible , to set a small icon in a notification builder
Asked
Active
Viewed 161 times
0

Nevaran
- 137
- 9
-
`SetSmallIcon(Resource.mipmap.ic_launcher)` method will set a small icon for your notification, what do you want? – Robbit Jan 01 '18 at 07:05
-
This is not what i want - im generating a bitmap using a canvas and paint, and i need it converted from a bitmap to an icon so i can set it – Nevaran Jan 01 '18 at 19:44
-
[You want convert bitmap to drawable?](https://stackoverflow.com/questions/2415619/how-to-convert-a-bitmap-to-drawable-in-android) Could you please show your code? – Robbit Jan 02 '18 at 08:09
-
Is a drawable able to be set as icon for notifications? – Nevaran Jan 02 '18 at 17:32
-
`using (Icon ico = Icon.CreateWithBitmap(bm)) { builder.SetSmallIcon(ico); }` This is literally the code, **bm** being a bitmap that has been generated, and i need a way for it to get converted to an icon so i can set the small icon of the notification – Nevaran Jan 02 '18 at 17:56
-
After reading [source code](https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/Notification.java), I can't find a way to custom the small icon, and [there is a answer you should take a look](https://stackoverflow.com/questions/23836920/how-to-set-bitmap-as-notification-icon-in-android) – Robbit Jan 03 '18 at 02:15
-
Yes ive seen that, but I cant figure how to set the drawable bitmap converted to exist in my package resource after being generated – Nevaran Jan 05 '18 at 22:24
-
You can't convert, if you can convert it, then it will be hack, you can also change others app's resource. You can think it. – Robbit Jan 06 '18 at 02:28