How can I use an SVG vector drawable (XML) as an Icon for NotificationCompat.Builder().setSmallIcon(Icon icon)

  Kiến thức lập trình

I have an SVG vector drawable button.xml that I want to use as an Icon for a notification builder in either of the setSmallIcons ..

new NotificationCompat.Builder(this, "arbitrary")
                        .setSmallIcon(IconCompat icon)
                        .build();


new NotificationCompat.Builder(this, "arbitrary")
                        .setSmallIcon(Int icon)
                        .build();

I’ve researched and have found nothing.

2

LEAVE A COMMENT