Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon not shown in desktop notifier #73

Closed
Echecivuole opened this issue Feb 11, 2021 · 8 comments
Closed

Icon not shown in desktop notifier #73

Echecivuole opened this issue Feb 11, 2021 · 8 comments

Comments

@Echecivuole
Copy link

Hi, the desktop notifier works fine, but even adding the code
resource_path('image.png')
the image is not showing. I read some other posts for which it would need required to install other package into the OSX o Windows pc, but this cannot be asked to all users using this feature.

Any solution?

@lyrixx
Copy link
Member

lyrixx commented Feb 11, 2021

may be you can use an emoji

@Echecivuole
Copy link
Author

An emoji!? No the solution would be to allow showing image from path

@pyrech
Copy link
Member

pyrech commented Feb 11, 2021

Hello @Echecivuole,

JoliNotif is PHP library that acts as thin wrapper around the desktop notifiers available on your OS. Here is the list of the supported notifiers: https://github.com/jolicode/JoliNotif/blob/master/doc/03-notifier.md#supported-notifiers

If yours users do not have a supported notifier accepting icons installed on their OS, then I guess there is nothing we can do on our side.

I'm closing the issue as everything is already explained in the documentation but feel free to reopen if you think about a possible workaround.

@pyrech pyrech closed this as completed Feb 11, 2021
@Echecivuole
Copy link
Author

Hello @Echecivuole,

JoliNotif is PHP library that acts as thin wrapper around the desktop notifiers available on your OS. Here is the list of the supported notifiers: https://github.com/jolicode/JoliNotif/blob/master/doc/03-notifier.md#supported-notifiers

If yours users do not have a supported notifier accepting icons installed on their OS, then I guess there is nothing we can do on our side.

I'm closing the issue as everything is already explained in the documentation but feel free to reopen if you think about a possible workaround.

Hello, thanks for explanation. I need to re-open, but I don't find the way, as I think issue is not related to my OSX system, which currently gets already desktop notifications, but the limit of this package to show in the desktop also an image. Any way to show also the image?

@damienalexandre
Copy link
Member

As far as we know, there is no solution. Your users need an icon compatible notifier and then JoliNotif will work as you expect. JoliNotif cannot add functionality on top of Operating System notifications.

By the way you never told what system exactly is concerned by your issue. Can you follow those instructions? #70 (comment) and report back here.

@Echecivuole
Copy link
Author

As far as we know, there is no solution. Your users need an icon compatible notifier and then JoliNotif will work as you expect. JoliNotif cannot add functionality on top of Operating System notifications.

By the way you never told what system exactly is concerned by your issue. Can you follow those instructions? #70 (comment) and report back here.

The issue is concerned to ALL OSX for sure, and probably also to Windows OS, which didn't apply specific programmic actions, which we cannot ask to our users. Desktop notification is correctly delivered embedding into the card the variable text. The question is: why the card is not able to embed an image from an URL?

@pyrech
Copy link
Member

pyrech commented Feb 12, 2021

I need to re-open, but I don't find the way, as I think issue is not related to my OSX system, which currently gets already desktop notifications, but the limit of this package to show in the desktop also an image. Any way to show also the image?

The issue is concerned to ALL OSX for sure, and probably also to Windows OS, which didn't apply specific programmic actions, which we cannot ask to our users. Desktop notification is correctly delivered embedding into the card the variable text. The question is: why the card is not able to embed an image from an URL?

Again, this package is a small abstraction around the desktop notifiers available on your system. If those notifiers do not accept an option to embed an image, then there is nothing we can do.

By default, on OSX we use an AppleScript (through the executable osascript) which do not support setting a custom icon.

I just checked on latest MacOS with terminal-notifier (which is supported by jolinotif, just run brew install terminal-notifier to install it). And even if terminal-notifier provides an -appIcon option, it doesn't work. It looks like this is directly related to how MacOS notifications work (see this comment explaining the issue mikaelbr/node-notifier#71 (comment)).

The only thing here we can do here is to change a bit the behaviour of terminal-notifier to embed an image instead of trying to change the notification's icon by using -contentImage instead of -appIcon:

screen-1

But again, this will work only if yours users have the terminal-notifier available on their computer - which is not the case by default.

@Echecivuole
Copy link
Author

rk only if yours users have the te

I need to re-open, but I don't find the way, as I think issue is not related to my OSX system, which currently gets already desktop notifications, but the limit of this package to show in the desktop also an image. Any way to show also the image?

The issue is concerned to ALL OSX for sure, and probably also to Windows OS, which didn't apply specific programmic actions, which we cannot ask to our users. Desktop notification is correctly delivered embedding into the card the variable text. The question is: why the card is not able to embed an image from an URL?

Again, this package is a small abstraction around the desktop notifiers available on your system. If those notifiers do not accept an option to embed an image, then there is nothing we can do.

By default, on OSX we use an AppleScript (through the executable osascript) which do not support setting a custom icon.

I just checked on latest MacOS with terminal-notifier (which is supported by jolinotif, just run brew install terminal-notifier to install it). And even if terminal-notifier provides an -appIcon option, it doesn't work. It looks like this is directly related to how MacOS notifications work (see this comment explaining the issue mikaelbr/node-notifier#71 (comment)).

The only thing here we can do here is to change a bit the behaviour of terminal-notifier to embed an image instead of trying to change the notification's icon by using -contentImage instead of -appIcon:

screen-1

But again, this will work only if yours users have the terminal-notifier available on their computer - which is not the case by default.

ok thanks for your reply. Got it this is limitation OSX only. Last question: Is the above issue related also to the "TERMINAL-NOTIFIER" text and icon?

thanks!

vesper8 added a commit to vesper8/JoliNotif that referenced this issue Mar 7, 2024
Related to jolicode#73

Since appIcon is no longer supported, there is this alternative to including an image using -contentImage and this PR adds the ability to set the appImage as an option.
pyrech pushed a commit to vesper8/JoliNotif that referenced this issue Apr 24, 2024
Related to jolicode#73

Since appIcon is no longer supported, there is this alternative to including an image using -contentImage and this PR adds the ability to set the appImage as an option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants