Reputation: 61
In my application the user pick an application from list of applications installed on their phone.
I want to create a notification with an icon of the choosen application.
The problem is that I can't save the icon inside my application, and if I save it somethere else I won't be able to get the icon by id, as it needed to create a notification.
How can I solve this?
Upvotes: 3
Views: 1762
Reputation: 54742
you can not add or edit the resource of res folder. And as the main icon of notification is provided as an icon id so you can not change by dynamic images from program. But there is another icon option in the notification. it is a small icon (althgouh it is called large icon!! dont know why) at the right side of the notification. you can set it by sending Bitmap as parameter.
you can see the look of this icon in this link. see the number 6 of normal view.
To set this icon you can use setLargeIcon method.
Upvotes: 1