Is there a way to show desktop notifications even if Chrome closed? - html

I'm developing a Google Chrome Extenstion, I wonder if there is anyway to show desktop notifications even if Chrome is closed, maybe some sort of background process or service? Kindly advice and guide me if it is not possible also. Thanks.

If you request a "background" permission your extension's background page will be able to show notifications even with Chrome windows closed.
When any installed hosted app, packaged app, or extension has "background" permission, Chrome runs (invisibly) as soon as the user logs into their computer—before the user launches Chrome. The "background" permission also makes Chrome continue running (even after its last window is closed) until the user explicitly quits Chrome.

If you use Google Chrome, you can enable a new Gmail feature that shows desktop notifications for new messages. Go to "Settings", and enable chat notifications and mail notifications to see a small bubble when you get a new message.
Secondly: Using WCF or Windows Services:
you have to develop simple client on machine polling a central service for alerts. Each alert should have a unique id so each client can deal with idem-potency
I Hope that this will be helpfull to you
Regards: Azeem Raavi

Related

chrome.enterprise.deviceAttributes availability for force-installed PWAs in chrome enterprise

I'm trying to determine if I can access any browser api for chrome OS that will allow me to identify the device that its running on when the application has been force-installed in kiosk mode as a PWA.
We're running into exactly the same issue right now. The correct path seems to be to create a PWA and to connect it to a (pre-installed) extension that has access to the enterprise.deviceAttributes:
See https://developers.chrome.com/apps/migration:
"If there is a capability that your Chrome App has that the regular web platform can't provide, it might be available as an extension API. In this case, you use a progressive web app together with an externally connectable extension your web app can send messages to."
enterprise.deviceAttributes are only accessible if the calling App/Site is pre-installed to the device and not loaded dynamically, so it cannot run in the PWA by design.
But with this tutorial, it seems possible:
https://developer.chrome.com/extensions/messaging#external-webpage
We're looking into that right now and will post our progess here.

Enabling a Kiosk App on a Chromebook

I am currently developing a kiosk application and have been trying to use the "Manage kiosk applications..." option in the Chrome://extensions page when developer mode is on.
Whenever I choose an application in the manage kiosk applications popup it just saying invalid application. I've tried local IDs, Chrome Web Store IDs and still nothing works.
In the manifest I've allowed kiosk mode and have another version with kiosk only enabled but that still doesn't work.
This is not a hosted app, all the assets are local and the Chromebook is not managed.
I've tried other solutions such as logging out and pressing ctrl+alt+k at login. I've wiped the chromebook and restarted fresh.
Any help would be appreciated.
If you're not hosting the app in the Chrome Web Store, Managing Kiosk Applications should be done by entering the app ID and the URL of the third-party web server in the Specify a Custom App dialog and click Add.
You may check Create a Chrome Kiosk App to know more details on how to create, publish and add the app as kiosk app.
Kiosk apps can only be installed from the "Manage kiosk applications..." menu if they are published in the Chrome Web Store as either "Public" or "Unlisted". If the app is published as "Private" it will fail to load.

is it possible to keep a packaged app running after `chrome.runtime.reload()` without additional windows?

I have a packaged app that calls chrome.runtime.reload(). On a desktop OS (Windows, OSX) this call will cause the application to close, but not restart unless there is an additional Chrome page open.
I assume this is because if it is the only Chrome app running, it closes the Chrome process entirely and there is nothing to restart it.
Adding the background permission looks like it should work, according to the documentation but it does not seem to actually start Chrome when the user logs in (and keep it running) as the documentation states.
A user can override this globally with a setting.
In Chrome's settings with "Show advanced settings":
System > Continue running background apps when Google Chrome is closed
Perhaps it is disabled on your development system.

Google cloud messaging in chrome browser: does chrome itself have to be open to receive gcm?

I am not sure if the Chrome browser itself must be open to receive google cloud messages on a laptop.
I know that my chrome extension does not need to be open, but what about Chrome itself?
I'd like my user to be able to receive google cloud messages through Chrome as long as their laptop is on.
I know Safari push notifications will be received even if Safari is not running. Is this true for Chrome google cloud messages too?
Thanks
Yes Chrome must be running. However Chrome runs differently on Windows if there are background app.

Chrome App using sockets api run without opening Chrome window

I want to build a Chrome App to listen notifications sent by my Lab, and I don't want to open a Chrome window(just let the app run in background silently, and pop a box when I have a new message). But sockets api is only for packaged app, and packaged app has no background permission, what should I do? Thx.
(Quick answer, will edit later with more info.)
Chrome Packaged Apps don't need that permission, they have a background page by default. Most (say, 99% of existing) chrome apps will open a window when they launch, but thats optional.
If your app has an open window, the runtime will keep your application running an not move into an idle state. However, if you are using certain APIs, such as having an open TCP server socket listening for incoming connections, its very unlikely that the runtime will shut your app down unless the system is under serious constraints.