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

Support for desktop notifications #255

Open
cztomczak opened this issue Aug 7, 2019 · 2 comments
Open

Support for desktop notifications #255

cztomczak opened this issue Aug 7, 2019 · 2 comments

Comments

@cztomczak
Copy link
Owner

cztomczak commented Aug 7, 2019

Add example of using JoliNotif PHP library to display desktop notifications. With this library you can send desktop notifications directly from your PHP script. Works on Windows, Mac and Linux, see: https://github.com/jolicode/JoliNotif

Html5 Notifications API is not supported by CEF which PHP Desktop uses to embed Chrome browser.

In the future we may add native support for desktop notifications and expose such API through window.phpdesktop javascript object.

@shanmukhateja
Copy link

Hi @cztomczak,

I would like to know how would we execute PHP lib in client_handler.cpp? The way I see it, all available methods inside window.phpdesktop object are Cef related and are handled in ClientHandler::OnProcessMessageReceived. Do you have a strategy in mind?

I checked the PHP lib in your above comment and its a wrapper around executables inside bin directory.

The way I see it, we would need to use a C/C++ lib that can provide the same functionality or go the same route as JoliNotif and wrap the code.

@cztomczak
Copy link
Owner Author

You can execute any binary (PHP or notifu) from C++. On Windows use ShellExecuteEx. Example code: https://github.com/cztomczak/phpdesktop/search?q=shellexecuteex&unscoped_q=shellexecuteex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants