# Cannot change icon in toast notification except privileged app

**URL:** <https://forum.webosose.org/t/cannot-change-icon-in-toast-notification-except-privileged-app/1181>\
**Category:** App Development\
**Created:** [August 28, 2020, 9:42am UTC](https://forum.webosose.org/t/cannot-change-icon-in-toast-notification-except-privileged-app/1181 "2020-08-28T09:42:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jikjoo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/jikjoo/32/404_2.png) [@jikjoo](https://forum.webosose.org/u/jikjoo)\
**Post date:** [August 28, 2020, 9:42am UTC](https://forum.webosose.org/t/cannot-change-icon-in-toast-notification-except-privileged-app/1181/1 "2020-08-28T09:42:53Z")

</div>

Hi, I tried to change icon in toast notification, but it was not changed.  
I tried luna-send, WebOSServiceBridge API, and LS2Request in Enact, also I set my requiredPermissions to all in appinfo.json, but didn't work at all.

these are my code.

`luna-send -n 1 -f -a com.bangul.app.webos luna://com.webos.notification/createToast '{"sourceId":"com.bangul.app.webos","message":"hello world", "iconUrl":"/usr/palm/applications/com.palm.app.settings/icon.png"}'`

```auto
LS2.send({
        service: 'luna://com.webos.notification',
        method: 'createToast',
        parameters: {
            "sourceId": "com.bangul.app.webos",
            "message": `${text.title}: ${text[type]}`,
            "persistent": true,
            "iconUrl": "/media/developer/apps/usr/palm/applications/com.bangul.app.webos/icon.png" 
        },
        onComplete: (res) => {
            console.log({ createToast: res })
        },
    })

```

appInfo.json

```auto
{
  "id": "com.bangul.app.webos",
...
 "requiredPermissions": [
    "all","notifications","devices","media"
  ]
}

```

This is the result of `ls-monitor` when using luna-send.

```auto
2408.792 TX call 4 com.webos.lunasend-1058 (QVeQDfjE) com.webos.notification (nO0VDDG6)
com.banugl.app.webos //createToast «{"sourceId":"com.banugl.app.webos","message":"hello world","iconUrl":"/media/developer/apps/usr/palm/applications/com.bangul.app.webos/icon.png"}»
2408.792 RX call 4 com.webos.notification (nO0VDDG6) com.webos.lunasend-1058 (QVeQDfjE)
com.banugl.app.webos //createToast «{"sourceId":"com.banugl.app.webos","message":"hello world","iconUrl":"/media/developer/apps/usr/palm/applications/com.bangul.app.webos/icon.png"}»
2408.792 TX return 36 com.webos.notification (nO0VDDG6) com.webos.surfacemanager (4U7ietXj) «{"returnValue":true,"message":"hello world","iconPath":"/usr/palm/notificationmgr/images/toast-notification-icon.png","type":"standard","title":"","isCradleReq":false,"sourceId":"com.banugl.app.webos","timesource":"ntp","timestamp":"1598538666539","onlyToast":true,"isSysReq":false,"schedule":{"expire":1601130666},"iconUrl":"file:///usr/palm/notificationmgr/images/toast-notification-icon.png","action":{}}»
2408.792 TX return 4 com.webos.notification (nO0VDDG6) com.webos.lunasend-1058 (QVeQDfjE) «{"toastId":"com.banugl.app.webos-1598538666539","returnValue":true}»
2408.792 RX return 36 com.webos.surfacemanager (4U7ietXj) com.webos.notification (nO0VDDG6) «{"returnValue":true,"message":"hello world","iconPath":"/usr/palm/notificationmgr/images/toast-notification-icon.png","type":"standard","title":"","isCradleReq":false,"sourceId":"com.banugl.app.webos","timesource":"ntp","timestamp":"1598538666539","onlyToast":true,"isSysReq":false,"schedule":{"expire":1601130666},"iconUrl":"file:///usr/palm/notificationmgr/images/toast-notification-icon.png","action":{}}»
2408.792 RX return 4 com.webos.lunasend-1058 (QVeQDfjE) com.webos.notification (nO0VDDG6) «{"toastId":"com.banugl.app.webos-1598538666539","returnValue":true}»
2408.793 TX call 6 com.webos.lunasend-1058 (QVeQDfjE) com.webos.notification (nO0VDDG6)
/com/palm/luna/private/cancel «{"token":4}»
2408.793 RX call 6 com.webos.notification (nO0VDDG6) com.webos.lunasend-1058 (QVeQDfjE)
/com/palm/luna/private/cancel «{"token":4}»

```

I found that if using app whose name is started com.webos.~ or com.palm.`~,  
it did work.  
I think it's the problem in below codes

> <https://github.com/webosose/notificationmgr/blob/0936da1e9a529ccb0780d9b20f8152d7191f76c1/src/NotificationService.cpp#L451>

Could you tell me if there's any other way to **change Icon in toast notification**?

---

<div class="post-metadata">

**Author:** ![nicolas](https://avatars.discourse-cdn.com/v4/letter/n/67e7ee/32.png) [@nicolas](https://forum.webosose.org/u/nicolas)\
**Post date:** [September 4, 2020, 5:26am UTC](https://forum.webosose.org/t/cannot-change-icon-in-toast-notification-except-privileged-app/1181/2 "2020-09-04T05:26:55Z")

</div>

I asked the dev team and they said you are right, it only works on the privileged app. If I hear the updated news about that, I will share it with you.

---

<div class="post-metadata">

**Author:** ![NERGI](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/nergi/32/364_2.png) [@NERGI](https://forum.webosose.org/u/NERGI)\
**Post date:** [September 21, 2020, 2:21am UTC](https://forum.webosose.org/t/cannot-change-icon-in-toast-notification-except-privileged-app/1181/3 "2020-09-21T02:21:22Z")

</div>

Hi @jikjoo,

There is no other way to change the icon in toast notification unless you change the OSE source code.  
The reason why we prohibit it is:  
If it is allowed, there is a possibility to imitate famous app's notification (such as YouTube, Netflix.) And it can be considered as a potential security threat.

Thanks,
